Google Chrome say: Error 400 Bad request

Bug #1483624 reported by Sallai András
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
weborf
Opinion
Wishlist
LtWorf

Bug Description

uname -a:
Linux vilag 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:30:01 UTC 2014 i686 athlon i686 GNU/Linux

The package from distribution.

I'm using Linux Mint 17.1. That using Ubuntu repository.

The Weborf version: 0.13-3

I maked simple webpage, which good in Firefox, Opera, but ind Google Chrome, I received Error 400 page, with "Bad request"
message.

weborf -p 8000 -b ~/pub

in Chrome:
http://localhost:8000

Revision history for this message
LtWorf (tiposchi) wrote :

Please use wireshark to capture the request and response and attach those.

Changed in weborf:
status: New → Incomplete
assignee: nobody → LtWorf (tiposchi)
Revision history for this message
Sallai András (termih) wrote :

Here is the Google Chrome query, from wireshark:

GET / HTTP/1.1\r\n
Host: localhost:8000\r\n
Connection: keep-alive\r\n
Cache-Control: max-age=0\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n
Upgrade-Insecure-Requests: 1\r\n
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36\r\n
Accept-Encoding: gzip, deflate, sdch\r\n
Accept-Language: hu-HU,hu;q=0.8,en-US;q=0.6,en;q=0.4\r\n
[truncated] Cookie: org.cups.sid=b01db4ee73622e4d73a7f9b36dd47b6d; WebsiteSessionID=g13821bqu4hv06935sl39er8n0; b930bf73fd041e799bb1ff82c109ad41=48j4n4mienq7j0nof3tb22iq05; 6d60940bcb4111c00ddcdc30383a797f=g5tn2nfha7dpbhr17bska8bdf7; Tiddl
\r\n
Full request URI: http://localhost:8000/
HTTP request 1/1
Response in frame: 11

Revision history for this message
LtWorf (tiposchi) wrote :

Hello,

I need both request and answer, and please attach as binary file, don't copy and paste.

Revision history for this message
Sallai András (termih) wrote :

I hope this thinking. Attached the Wireshark rescue.

Revision history for this message
LtWorf (tiposchi) wrote :

You have more than 1KiB of cookies! Weborf uses a limited buffer to store the request, before starting to serve it.

That request can't fit inside the buffer.

I would clear the cookies, but if you really really need to have such a large request, you will have to recompile weborf after changing the hardcoded parameters in the file options.h.

Changed in weborf:
status: Incomplete → Opinion
Revision history for this message
LtWorf (tiposchi) wrote :

Also, I don't know how common might be to have such huge cookies, I guess I will have to do some research and decide what to do about this.

Changed in weborf:
importance: Undecided → Low
importance: Low → Wishlist
Revision history for this message
Sallai András (termih) wrote :

In fact, I increased the size of the Buffer and operate.

I did so on Linux Mint:

cp /etc/apt/sources.list.d/official-package-repositories.list /etc/apt/sources.list.d/source.list
sed -i s/^deb/deb-src/g /etc/apt/sources.list.d/source.list

apt-get update
apt-get install build-essential debhelper
apt-get install libmagic-dev pyqt4-dev-tools hardening-wrapper
cd /usr/local/src

apt-get source weborf

cd weborf-0.13
sed -i -e s'/^#define INBUFFER 1024/#define INBUFFER 4096/' options.h.in

dpkg-source --commit
dpkg-buildpackage

Revision history for this message
Sallai András (termih) wrote :

And install:

dpkg -i weborf_0.13-3_i386.deb

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.