View previous topic :: View next topic |
Author |
Message |
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Tue Sep 09, 2003 7:46 pm Post subject: 400 - Bad Request : Aprelium Peeps Take A Look Please! |
|
|
I've tried searching through the FAQs and other posts and I can't find anything so hopefully this is just a newbie error and someone will know a quick fix.
I'm not a new user of Abyss, I've been using it for ages as a private LAN intranet server, and to serve up a few pages over dialup, so I'm pretty sure I haven't miss configured anything. I just got broadband, and set up my router to forward a port to my machine so I can serve a few pages, photos etc privately. The problem is that whenever anyone connects over the router with a browser, all they can get is a Error 400 / Bad Request. Abyss doesn't log any error in the access log for the requests which fail.
The server still works fine if :
I connect to localhost
I connect via one of the machines on my own lan
I connect via telnet from outside the router and do a simple GET / HTTP 1.0 request; I see the whole page returned correctly.
The fact that it works fine with a remote telnet session + my firewall logs confirms that port forwarding is set up correctly on the router and the traffic is definitely arriving at my machine.
If I sniff the incoming connection when using a browser I see what appears to be a perfectly valid browser GET request.
Request :
GET / HTTP/1.0
Host: [removed].ath.cx:32145
Accept: text/html, text/plain, text/sgml, */*;q=0.01
Accept-Encoding: gzip, compress
Accept-Language: en
User-Agent: Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c
Response :
HTTP/1.1 400 Bad Request
Content-Type: text/html
Connection: Close
Date: Tue, 09 Sep 2003 17:24:24 GMT
<HTML><HEAD><TITLE>Error 400</TITLE></HEAD><BODY><H1>Error 400</H1><P>Bad Request</P></BODY></HTML>
The only thing I can think of is that I have my router set up to forward a non standard port (32145) to port 80 on my machine. Does Abyss not like mismatched Host headers or are these completely irrelevant ? I've tried everything from Lynx to Mozilla to IE on various machines and still have the same problem.
Am I missing something obvious ? Help!
TIA
:D
Edit : Just spoken to a friend over ICQ and he confirmed -
Host: [removed].ath.cx = works
Host: [removed].ath.cx:32145 = fails
Host: [removed].ath.cx:80 = fails
Is there any way I can get Abyss to ignore the host headers, or could you hack something up ? |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Sep 10, 2003 3:43 pm Post subject: Re: 400 - Bad Request : Aprelium Peeps Take A Look Please! |
|
|
Error 400 happens because Abyss doesn't accept the port in the Host field to be different from the port it is really using.
So if Abyss is listening on port 80, it will consider the request as bad if the Host header claims the port is 32145.
This problem happens because the HTTP protocol says nothing about this particular issue so each one has to provide his/her own interpretation. Our's is to refuse to service such a request.
But if this may cause problems to users, we can modify it so that Abyss will accept such requests.
Can you please contact us (support@aprelium.com) to get a version that disables this behavior? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Wed Sep 10, 2003 3:48 pm Post subject: |
|
|
I certainly can :D
Thank you for such a quick response; I was gloomily pondering installing Apache instead!
Sending a mail now 8) |
|
Back to top |
|
 |
dicer423 -
Joined: 23 Oct 2003 Posts: 1
|
Posted: Thu Oct 23, 2003 9:10 pm Post subject: |
|
|
Just stumbled on that problem too.
If you don't want to change it in the official version, please add a line to the FAQ!
dicer |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Oct 24, 2003 12:23 pm Post subject: |
|
|
dicer423,
This change is now part of the official version (not the current, but the one which will be available soon). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|