Bug 225167 - ktorrent always use keep-alive in web-interface
Summary: ktorrent always use keep-alive in web-interface
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-01 17:54 UTC by tuupic
Modified: 2010-03-07 18:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tuupic 2010-02-01 17:54:29 UTC
Version:           3.3.3 (using KDE 4.3.4)
OS:                Linux
Installed from:    Compiled From Sources

ktorrent always use keep-alive connection. This is the problem. It can not be proxied throughout nginx or another proxy.
=================
tuupic ~ # telnet tuupic 8080
Trying 192.168.0.2...
Connected to tuupic.
Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 500
Connection: keep-alive
Content-Length: 189
Content-Type: text/html
Date: Mon, 01 Feb 2010 16:45:47 UTC
Server: KTorrent/3.3.3

<html><head><title>HTTP/1.1 500 Internal Server Error</title></head><body><h1>Internal Server Error</h1><p>Произошла внутренняя ошибка сервера: Неподдерживаемый метод HTTP</p></body></html>^]
telnet> q
Connection closed.
tuupic ~ #
=================
Comment 1 Joris Guisson 2010-02-02 18:22:55 UTC
First of all the HTTP server does not support HEAD.

Second how does using keep-alive prevents the webinterface from being proxied ?
Comment 2 tuupic 2010-02-02 18:41:57 UTC
It was just example, that ktorrent use keep-alive by default.

Nginx use only HTTP/1.0 without keep-alive for backend.

In HTTP/1.0 keep-alive disabled by default and server(ktorrent) must not answer HTTP/1.1 answer on HTTP/1.0 request.
Comment 3 Joris Guisson 2010-03-07 18:19:23 UTC
SVN commit 1100501 by guisson:

Fix handling of keep-alive in webinterface plugin 

BUG: 225167

 M  +1 -0      ChangeLog  
 M  +52 -3     plugins/webinterface/httpclienthandler.cpp  
 M  +3 -2      plugins/webinterface/httpclienthandler.h  
 M  +5 -3      plugins/webinterface/httpresponseheader.cpp  
 M  +4 -1      plugins/webinterface/httpresponseheader.h  
 M  +10 -11    plugins/webinterface/httpserver.cpp  
 M  +1 -1      plugins/webinterface/httpserver.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1100501