Closed Bug 1665 Opened 26 years ago Closed 26 years ago

NECKO: quote.com doesn't load because of faulty redirect

Categories

(Core :: DOM: Navigation, defect, P1)

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: paulmac, Assigned: gagan)

References

()

Details

www.quote.com gets redirected to http://www.quote.com/layout/index.frames.html but it shows up in raptor as http:///layout/index.frames.html so you get an object not found error. Marking stop ship, though I'm not sure if it should be or not - it is a fairly popular site. xpviewer, win95, 11/24 builds
Summary: ss: quote.com doesn't load because of faulty redirect → rn: quote.com doesn't load because of faulty redirect
Will rn: frame issues.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Summary: rn: quote.com doesn't load because of faulty redirect → quote.com doesn't load because of faulty redirect
Why is this marked resolved invalid? Paul can you confirm this...
Status: RESOLVED → REOPENED
Gags, no i don't know why it got marked invalid. I'll re-open it for now.
Subject: Problem in LoadURL code of nsWebshell.cpp (bug# 1665) Date: Fri, 11 Dec 1998 20:45:05 -0800 From: raman tenneti <raman@netscape.com> To: rpotts@netscape.com CC: kipp@netscape.com, dp@netscape.com, gagan@netscape.com Hello Rick, I have been learning and fixing bugs (gagan's and Valeski's) in netlib code during last couple of weeks. I think I have narrowed down the problem with why www.quote.com doesn't work in 5.0. The following code adds http:// if the aURLSpec starts with / (without taking into consideration that the URL could be a redirect). In this case the redirect returned /layout/index.html, and the code in LoadURL converts it into http:///layout/index.html, which doesn't exist. It looks like the following code in nsWebShell.cpp is not correct. WDYT? Any suggestions on how to fix this? Ihave updated bug# 1665 with lot more details. thanks much, raman NS_IMETHODIMP nsWebShell::LoadURL((const PRUnichar *aURLSpec, ... fSlash=urlSpec.Find('/'); // if no scheme (protocol) is found, assume http. if ( ((colon=urlSpec.Find(':')) == -1) // no colon at all || ( (fSlash > -1) && (colon > fSlash) ) // the only colon comes after the first slash || ( (colon < urlSpec.Length()-1) // the first char after the first colon is a digit (i.e. a port) && ((port=urlSpec.CharAt(colon+1)) < '9') && (port > '0') ) ) { nsString httpDef("http://"); urlSpec.Insert(httpDef, 0, 7); } Trace output from Netlib. You could see netlib had it correctly just before nsWebShell.cpp built a new URL with corrpt data. The following is how the stack was looking at the time of the corruption (OpenStream method gets wrong URL). URLImpl::GetSpec() line 254 nsNetlibService::OpenStream(nsNetlibService * const 0x011fcdb0, nsIURL * 0x0136f760, nsIStreamListener * 0x0136f4b0) line 321 + 13 bytes nsDocumentBindInfo::Bind(nsIURL * 0x0136f760, nsIStreamListener * 0x00000000) line 1365 + 23 bytes nsDocumentBindInfo::Bind(const nsString & {...}, nsIPostData * 0x00000000, nsIStreamListener * 0x00000000) line 1339 + 16 bytes nsDocLoaderImpl::LoadDocument(nsDocLoaderImpl * const 0x0121e5c0, const nsString & {...}, char * 0x018f19c8, nsIContentViewerContainer * 0x0121e120, nsIPostData * 0x00000000, nsISupports * 0x00000000, nsIStreamObserver * 0x0121e13c, ...) line 884 + 18 byt nsWebShell::LoadURL(nsWebShell * const 0x0121e120, unsigned short * 0x0012c3dc, char * 0x018f19c8, nsIPostData * 0x00000000, int 0x00000000, nsURLReloadType nsURLReload, const unsigned int 0x00000000) line 1236 + 88 bytes nsWebShell::LoadURL(nsWebShell * const 0x0121e120, unsigned short * 0x0012c3dc, nsIPostData * 0x00000000, int 0x00000000, nsURLReloadType nsURLReload, const unsigned int 0x00000000) line 1153 + 40 bytes LocationImpl::Replace(LocationImpl * const 0x01336c04, const nsString & {...}) line 536 + 39 bytes LocationReplace(JSContext * 0x012b8980, JSObject * 0x019aa768, unsigned int 0x00000001, long * 0x0194db1c, long * 0x0012c4b8) line 352 + 16 bytes js_Invoke(JSContext * 0x012b8980, unsigned int 0x00000001, int 0x00000000) line 650 + 26 bytes js_Interpret(JSContext * 0x012b8980, long * 0x0012ca64) line 2183 + 15 bytes js_Invoke(JSContext * 0x012b8980, unsigned int 0x00000002, int 0x00000000) line 666 + 13 bytes js_Interpret(JSContext * 0x012b8980, long * 0x0012cfcc) line 2183 + 15 bytes js_Invoke(JSContext * 0x012b8980, unsigned int 0x00000000, int 0x00000000) line 666 + 13 bytes js_Interpret(JSContext * 0x012b8980, long * 0x0012d598) line 2183 + 15 bytes js_Execute(JSContext * 0x012b8980, JSObject * 0x019a9210, JSScript * 0x0136a6f0, JSFunction * 0x00000000, JSStackFrame * 0x00000000, int 0x00000000, long * 0x0012d598) line 815 + 13 bytes JS_EvaluateUCScriptForPrincipals(JSContext * 0x012b8980, JSObject * 0x019a9210, JSPrincipals * 0x00000000, unsigned short * 0x0194b870, unsigned int 0x000010e9, char * 0x0125bf70, unsigned int 0x00000002, long * 0x0012d598) line 2323 + 27 bytes nsJSContext::EvaluateString(nsString & {...}, char * 0x0125bf70, unsigned int 0x00000002, long * 0x0012d598) line 78 + 64 bytes HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode & {...}) line 2331 + 45 bytes HTMLContentSink::AddLeaf(HTMLContentSink * const 0x0125d310, const nsIParserNode & {...}) line 1785 + 12 bytes CNavDTD::AddLeaf(const nsIParserNode & {...}) line 2943 + 22 bytes CNavDTD::HandleScriptToken(nsCParserNode & {...}) line 1117 + 12 bytes CNavDTD::OpenContainer(const nsIParserNode & {...}, int 0x00000001) line 2773 + 12 bytes CNavDTD::HandleDefaultStartToken(CToken * 0x012fe470, nsHTMLTag eHTMLTag_script, nsIParserNode & {...}) line 845 + 14 bytes CNavDTD::HandleStartToken(CToken * 0x012fe470) line 932 + 23 bytes NavDispatchTokenHandler(CToken * 0x012fe470, nsIDTD * 0x01361750) line 446 + 12 bytes CTokenHandler::operator()(CToken * 0x012fe470, nsIDTD * 0x01361750) line 80 + 14 bytes CNavDTD::HandleToken(CNavDTD * const 0x01361750, CToken * 0x012fe470, nsIParser * 0x0125d260) line 697 + 18 bytes nsParser::BuildModel() line 724 + 20 bytes nsParser::ResumeParse() line 689 nsParser::OnDataAvailable(nsParser * const 0x0125d264, nsIURL * 0x0124b380, nsIInputStream * 0x0125b590, int 0x000011b7) line 929 + 15 bytes nsDocumentBindInfo::OnDataAvailable(nsDocumentBindInfo * const 0x0124bf90, nsIURL * 0x0124b380, nsIInputStream * 0x0125b590, int 0x000011b7) line 1553 + 24 bytes OnDataAvailableProxyEvent::HandleEvent(OnDataAvailableProxyEvent * const 0x0125cea0) line 606 + 45 bytes StreamListenerProxyEvent::HandlePLEvent(PLEvent * 0x0125cea4) line 452 + 12 bytes PL_HandleEvent(PLEvent * 0x0125cea4) line 395 + 10 bytes PL_ProcessPendingEvents(PLEventQueue * 0x011d97b0) line 357 + 9 bytes _md_EventReceiverProc(void * 0x04270342, unsigned int 0x0000c0ae, unsigned int 0x00000000, long 0x011d97b0) line 675 + 9 bytes USER32! 77e71250() 011d97b0() mkparse: ParseURL: parsed - www.quote.com Entered: net_parse_first_http_line HTTP: Scanned 2 fields from first_line: HTTP/1.0 302 Found Receiving HTTP1 reply, status: 302 Got Redirect code parse_http_mime_headers: Parsing headers, got line: HTTP/1.0 302 Found parse_http_mime_headers: Parsing headers, got line: Server: Netscape-Commerce/1.12 parse_http_mime_headers: Parsing headers, got line: Date: Saturday, 12-Dec-98 03:58:26 GMT Parsing date string: Saturday, 12-Dec-98 03:58:26 GMT ... parse_http_mime_headers: Parsing headers, got line: Location: /layout/index.html Found location: http://www.quote.com/layout/index.html parse_http_mime_headers: Parsing headers, got line: Content-type: text/html Found content_type: text/html parse_http_mime_headers: Parsing headers, got line: Content-length: 204 parse_http_mime_headers: Parsing headers, got line: Finished parsing MIME headers NET_ProcessHTTP: setting up stream +Cleaning up JS Cookie Filters Doing redirect part in ProcessNet Entering NET_GetURL Called NET_GetURL with FO: 102 URL http://www.quote.com/layout/index.html -- with method: 0, and post headers: none Getting the rest of a partial cache file mkparse: ParseURL: parsed - www.quote.com Entering NET_ProcessHTTP NET_BeginConnect called for url: http://www.quote.com/layout/index.html mkparse: ParseURL: parsed - www.quote.com net_CheckDNSCache: comparing www.quote.com and www.quote.com Leaving GetURL with 1 items in list In: net_CheckForWaitingURL with 0 connection waiting URL's, 0 active waiting URL's and 1 open connections -------NET_AreThereActiveConnectionsForWindow called! Leaving process net with 1 items in list Entering ProcessNet! ready_fd: 19136144 Found item in Active Entry List. sock #19136144 con_sock #19136144 Item has data ready for read Entering NET_ProcessHTTP NET_FinishConnect called for url: http://www.quote.com/layout/index.html mktcp.c: Successful connection (message 1) Freeing TCPConData...Done with connect (i hope) Connected to HTTP server on sock #19136144 Entered "send_http_request" mkparse: ParseURL: parsed - /layout/index.html mkparse: ParseURL: parsed - www.quote.com HTTP: Not sending proxy authorization (yet) net_CheckForAuthorization: checking for auth on: http://www.quote.com/layout/index.html HTTP: Not sending authorization (yet) mkparse: ParseURL: parsed - www.quote.com mkparse: ParseURL: parsed - /layout/index.html HTTP: Not sending cookie Sending HTTP Request: --------------------------------- mkparse: ParseURL: parsed - www.quote.com Entered: net_parse_first_http_line HTTP: Scanned 2 fields from first_line: HTTP/1.0 200 OK Receiving HTTP1 reply, status: 200 parse_http_mime_headers: Parsing headers, got line: HTTP/1.0 200 OK parse_http_mime_headers: Parsing headers, got line: Server: Netscape-Commerce/1.12 parse_http_mime_headers: Parsing headers, got line: Date: Saturday, 12-Dec-98 03:57:00 GMT parse_http_mime_headers: Parsing headers, got line: Content-type: text/html Found content_type: text/html parse_http_mime_headers: Parsing headers, got line: Finished parsing MIME headers NET_ProcessHTTP: setting up stream Entering StreamBuilder: F-in: text/html F-out: 102 Enc: None Specified StreamBuilder: Comparing text/html and * Setting up cache stream. Have URL: http://www.quote.com/layout/index.html Entering StreamBuilder: F-in: text/html F-out: 38 Enc: None Specified StreamBuilder: Comparing text/html and application/http-index StreamBuilder: Comparing text/html and multipart/x-mixed-replace StreamBuilder: Comparing text/html and multipart/mixed StreamBuilder: Comparing text/html and * cache: URL_s->must_cache is FALSE cache: want_to_cache is TRUE mkparse: ParseURL: parsed - www.quote.com NET_ProcessHTTP: pulling data +++ stream is_write_ready. Returning 8192 NET_ProcessHTTP: write ready returned 8192 NET_ProcessHTTP: just read 4535 bytes. +++ stream put_block. Length = 4535 Leaving process net with 1 items in list Entering ProcessNet! ready_fd: 19136144 Found item in Active Entry List. sock #19136144 con_sock #0 Item has data ready for read Entering NET_ProcessHTTP NET_ProcessHTTP: pulling data +++ stream is_write_ready. Returning 3657 NET_ProcessHTTP: write ready returned 3657 NET_ProcessHTTP: just read 0 bytes. MKHTTP.c: Caught TCP EOF ending stream +++ stream complete. +Cleaning up JS Cookie Filters End of transfer, entry (soc=19136144, con=0) being removed from list with 1 status: http://www.quote.com/layout/index.html In: net_CheckForWaitingURL with 0 connection waiting URL's, 0 active waiting URL's and 0 open connections -------NET_AreThereActiveConnectionsForWindow called! net_ReleaseContext: not releasing non-modular context Leaving process net with 0 items in list Entering NET_InterruptStream
Resolution: INVALID → ---
Clearing the resolution (this bug still exists)
Setting all current Open/Normal to M4.
Note related bug 563, "Redirects don't work."
setting paulmac as QA contact for all gagan's bugs (sorry for the spam)
Target Milestone: M4 → M5
Marking till Necko lands...
Per DP's suggestion marking these till M8. Though Necko lands with M7, we will be able to verify it for M8.
Target Milestone: M8 → M9
Necko landing in M8, Moving to M9
Changing all Networking Library/Browser bugs to Networking-Core component for Browser. Occasionally, Bugzilla will burp and cause Verified bugs to reopen when I do this in a bulk change. If this happens, I will fix. ;-)
Summary: quote.com doesn't load because of faulty redirect → NECKO: quote.com doesn't load because of faulty redirect
Assuming redirects are working ok in Necko, please check.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
page looks good, though content has changed so really not a valid test. I should write better bug reports :-)
Bulk move of all Networking-Core (to be deleted component) bugs to new Networking component.
Component: Networking → Embedding: Docshell
You need to log in before you can comment on or make changes to this bug.