mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 664163 - Fix Get(Local|Remote)(Address|Port) in HttpChannelChild. r=jdm
This commit is contained in:
parent
f8fbbf0485
commit
6167fb9598
@ -291,6 +291,8 @@ HttpChannelChild::OnStartRequest(const nsHttpResponseHead& responseHead,
|
|||||||
mCacheEntryAvailable = cacheEntryAvailable;
|
mCacheEntryAvailable = cacheEntryAvailable;
|
||||||
mCacheExpirationTime = cacheExpirationTime;
|
mCacheExpirationTime = cacheExpirationTime;
|
||||||
mCachedCharset = cachedCharset;
|
mCachedCharset = cachedCharset;
|
||||||
|
mSelfAddr = selfAddr;
|
||||||
|
mPeerAddr = peerAddr;
|
||||||
|
|
||||||
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
|
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
|
||||||
|
|
||||||
@ -313,9 +315,6 @@ HttpChannelChild::OnStartRequest(const nsHttpResponseHead& responseHead,
|
|||||||
rv = ApplyContentConversions();
|
rv = ApplyContentConversions();
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
Cancel(rv);
|
Cancel(rv);
|
||||||
|
|
||||||
mSelfAddr = selfAddr;
|
|
||||||
mPeerAddr = peerAddr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class TransportAndDataEvent : public ChannelEvent
|
class TransportAndDataEvent : public ChannelEvent
|
||||||
@ -1113,36 +1112,6 @@ HttpChannelChild::SetupFallbackChannel(const char *aFallbackKey)
|
|||||||
DROP_DEAD();
|
DROP_DEAD();
|
||||||
}
|
}
|
||||||
|
|
||||||
// The next four _should_ be implemented, but we need to figure out how
|
|
||||||
// to transfer the data from the chrome process first.
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HttpChannelChild::GetRemoteAddress(nsACString & _result)
|
|
||||||
{
|
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HttpChannelChild::GetRemotePort(PRInt32 * _result)
|
|
||||||
{
|
|
||||||
NS_ENSURE_ARG_POINTER(_result);
|
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HttpChannelChild::GetLocalAddress(nsACString & _result)
|
|
||||||
{
|
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HttpChannelChild::GetLocalPort(PRInt32 * _result)
|
|
||||||
{
|
|
||||||
NS_ENSURE_ARG_POINTER(_result);
|
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// HttpChannelChild::nsICacheInfoChannel
|
// HttpChannelChild::nsICacheInfoChannel
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -106,10 +106,6 @@ public:
|
|||||||
bool aMerge);
|
bool aMerge);
|
||||||
// nsIHttpChannelInternal
|
// nsIHttpChannelInternal
|
||||||
NS_IMETHOD SetupFallbackChannel(const char *aFallbackKey);
|
NS_IMETHOD SetupFallbackChannel(const char *aFallbackKey);
|
||||||
NS_IMETHOD GetLocalAddress(nsACString& addr);
|
|
||||||
NS_IMETHOD GetLocalPort(PRInt32* port);
|
|
||||||
NS_IMETHOD GetRemoteAddress(nsACString& addr);
|
|
||||||
NS_IMETHOD GetRemotePort(PRInt32* port);
|
|
||||||
// nsISupportsPriority
|
// nsISupportsPriority
|
||||||
NS_IMETHOD SetPriority(PRInt32 value);
|
NS_IMETHOD SetPriority(PRInt32 value);
|
||||||
// nsIResumableChannel
|
// nsIResumableChannel
|
||||||
|
@ -22,14 +22,18 @@ TracingListener.prototype = {
|
|||||||
|
|
||||||
request.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
request.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
||||||
|
|
||||||
// local/remote addresses broken in e10s: disable for now
|
try {
|
||||||
/*
|
do_check_eq(request.localAddress, "127.0.0.1");
|
||||||
do_check_eq(request.localAddress, "127.0.0.1");
|
do_check_eq(request.localPort > 0, true);
|
||||||
do_check_eq(request.localPort > 0, true);
|
do_check_neq(request.localPort, 4444);
|
||||||
do_check_neq(request.localPort, 4444);
|
do_check_eq(request.remoteAddress, "127.0.0.1");
|
||||||
do_check_eq(request.remoteAddress, "127.0.0.1");
|
do_check_eq(request.remotePort, 4444);
|
||||||
do_check_eq(request.remotePort, 4444);
|
} catch(e) {
|
||||||
*/
|
do_throw("failed to get local/remote socket info");
|
||||||
|
}
|
||||||
|
|
||||||
|
request.QueryInterface(Components.interfaces.nsISupportsPriority);
|
||||||
|
request.priority = Ci.nsISupportsPriority.PRIORITY_LOW;
|
||||||
|
|
||||||
// Make sure listener can't be replaced after OnStartRequest was called.
|
// Make sure listener can't be replaced after OnStartRequest was called.
|
||||||
request.QueryInterface(Components.interfaces.nsITraceableChannel);
|
request.QueryInterface(Components.interfaces.nsITraceableChannel);
|
||||||
@ -138,8 +142,10 @@ function channel_finished(request, input, ctx) {
|
|||||||
httpserver.stop(do_test_finished);
|
httpserver.stop(do_test_finished);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// needs to be global or it'll go out of scope before it observes request
|
||||||
|
var observer = new HttpResponseExaminer();
|
||||||
|
|
||||||
function run_test() {
|
function run_test() {
|
||||||
var observer = new HttpResponseExaminer();
|
|
||||||
observer.register();
|
observer.register();
|
||||||
|
|
||||||
httpserver = new nsHttpServer();
|
httpserver = new nsHttpServer();
|
||||||
|
Loading…
Reference in New Issue
Block a user