LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > nested ErrorDocuments not working

Reply
 
Thread Tools Display Modes
  #21  
Old 05-16-2007, 12:59 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
Watching what wget does with -d -v is interesting:

Code:
---request begin---
GET /~demosite/fdgksdjfgsdfh5554 HTTP/1.0
User-Agent: Wget/1.10.2 (Red Hat modified)
Accept: */*
Host: 123.123.123.123
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response... 
---response begin---
HTTP/1.0 404 Not Found
Date: Wed, 16 May 2007 19:41:23 GMT
Server: LiteSpeed
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
Content-Length: 7
Content-Type: text/html---response end---
404 Not Found
Registered socket 3 for persistent reuse.
Skipping 7 bytes of body: [] aborting (EOF received).
Disabling further reuse of socket 3.
Closed fd 3
15:41:28 ERROR 404: Not Found.
Skipping 7 bytes of body: [] aborting (EOF received).

compare that to what apache does:
Code:
---request begin---
GET /~demosite/fdgksdjfgsdfh5554 HTTP/1.0
User-Agent: Wget/1.10.2 (Red Hat modified)
Accept: */*
Host: 123.123.123.123
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response... 
---response begin---
HTTP/1.1 404 Not Found
Date: Wed, 16 May 2007 19:49:07 GMT
Server: Apache
Connection: close
Content-Type: text/html; charset=iso-8859-1

---response end---
404 Not Found
Closed fd 3
15:49:07 ERROR 404: Not Found.
Now why apache is sending back a HTTP 1.1 response
when there is a clearly a 1.0 request is just weird. But that EOF is weird too.

Last edited by aww; 05-16-2007 at 01:01 PM..
Reply With Quote
  #22  
Old 05-16-2007, 01:07 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
Oh I'm sorry I totally missed I can just do this from console with lynx like you said:

This stuff is just wierd:
Code:
lynx -mime_header http://123.123.123.123/~demosite/fdgksdjfgsdfh5554
HTTP/1.0 404 Not Found
Date: Wed, 16 May 2007 20:06:13 GMT
Server: LiteSpeed
Connection: close
Content-Length: 7
Content-Type: text/html[%s] HttpConnection::onReadEx(), state: %d![%s] readToHeaderBuf() return %d. [%s] processNewReq() return %d. [%s] HttpConnection::flush()![%s] m_pHandler->onWrite() return %d
[%s] Handler write error, CLOSING![%s] redirect status code: %d[%s] Request has not been logged into access log, response body sent: %ld!int HttpConnection::writeRespBodyv(IOVec &, int)m_pChunkOS == __null[%s] Keep-alive timeout, close![%s] Connections over flow, close connection![%s] Connections is over the limit, close![%s] Shutdown time out![%s] Oops! POLLIN is turned off for this HTTP connection while reading request, turn it on, this should never happen![%s] BUG: fd %d does not match fd %d in pollfd![%s] Connection idle time: %ld while in state: %d watching for event: %d,close![%s] Request body size: %d, received: %d.@z
}
}
}
}
}
}
}
}
T|
and under apache

Code:
lynx -mime_header http://123.123.123.123/~demosite/fdgksdjfgsdfh5554
HTTP/1.1 404 Not Found
Date: Wed, 16 May 2007 20:08:41 GMT
Server: Apache
Connection: close
Content-Type: text/html; charset=iso-8859-1

missing

Last edited by aww; 05-16-2007 at 01:09 PM..
Reply With Quote
  #23  
Old 05-16-2007, 01:11 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
What is the possibility that litespeed is somehow closing the connection before the content is sent?
Reply With Quote
  #24  
Old 05-16-2007, 03:51 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
updated 3.1.2 release should have this issue addressed.
Reply With Quote
  #25  
Old 05-16-2007, 04:27 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
Quote:
Originally Posted by mistwang View Post
updated 3.1.2 release should have this issue addressed.
Ah, whew, so I am not going crazy?

I hope I helped find a bug. How many is that now?
Reply With Quote
  #26  
Old 05-16-2007, 07:55 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Thanks for those bug reports.
The bug only exists in the Standard edition, we tested Enterprise edition in our lab.
Reply With Quote
  #27  
Old 05-17-2007, 03:32 AM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
I installed that early 3.1.2 release a few hours ago and I am pleased to report that both the errordocument and the rewrite rules (as well as ~username) seem to be completely fixed and working exactly like apache now.

Many thanks for your help and the quick fix.
Reply With Quote
  #28  
Old 05-17-2007, 03:40 AM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
Oh one last thing, and this is very trivial but still, if you want to mimic apache 100%

Even in 3.1.2
when there is no index.* in
http://ipaddress/~demosite/
it generates a litespeed standard 404 message
regardless if the ErrorDocument 404 is present

Now not only is the standard 404 message wrong when errordocument is present, you have to add Options -Indexes to get the errordocument 404 "missing

but I believe apache generates a 403 "forbidden" error, not a 404 error, when there is no index.* and Options -Indexes is present

The 403 vs 404 error might be critical in some log tracking software to trigger an alert for people going where they might not suppose to be trying to go.
Reply With Quote
  #29  
Old 05-17-2007, 09:36 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Please try the updated 3.1.2 release package, 403 should be returned now.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:19 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.