Re: [Karrigell-main] url not found: reply with 404 and 200
Brought to you by:
quentel
From: Andrew N. <an...@ni...> - 2003-12-04 10:39:14
|
Remco Boerma wrote: >My guess is that not the correct code is sent back to the client.. >Hmm. it seems there are 2 codes sent back to the server..according to the >dump screen of karrigell: > >ipnprog - - [03/Dec/2003 10:38:03] code 404, message File not found >ipnprog - - [03/Dec/2003 10:38:03] "GET /test/jfdklajfdlkas HTTP/1.1" 200 - > >An both of these results for a complete bogus url. > > > You're right, since we're sending back a 202, even though we can't find the right page, the borwser thinks the error page *is* our javascript source ... and thus one full of errors. We have to change it to send back 404 so it knows that what it get's back is an error page; [Line 338 Karrigell_async.py] / [line332 Karrigell.py] (depending what version you're using) in the definition for "send_error". It only logs the 404 on the console then sends out a 202, OK . So if you change (line 338 Karrigell_async.py) or (line 332 Karrigell.py) from: self.send_response(200, "Ok") to: self.send_response(404, "File not found!") It should send the proper response: Karrigell 1.4 running on port 80 nelis - - [04/Dec/2003 10:28:42] code 404, message File not found nelis - - [04/Dec/2003 10:28:42] "GET /fckeditor.config.js HTTP/1.1" 404 - (only requested one page, maybe could remove the logging and just leave in the 2nd line...) HTH Andrew. |