aMule Bug Tracker - aMule
View Issue Details
0000628aMuleExternal Connpublic2005-10-30 12:132005-11-27 22:08
thetaphi 
lfroen 
normalminoralways
resolvedfixed 
SVN 
SVN 
0000628: Content-Length sent by amuleweb is missing the last byte
This is not visible when you connect directly with most webbrowsers to amuleweb, but if you have amuleweb somewhere behind a firewall and let it go out through mod_proxy of an apache 2.0 you could see the bug clearly, because apache cancels all bytes after the content-length is reached.

The bug seems to be not problem of the byte counting, more the cariage-returns at the end of the header lines. If you show the source of the HTML pages, amuleweb generates, you see an additional return before the "<html>" tag. mod_proxy or for example wget on the other hand strip the last bytes (because they think its behind the content-length), the pages end with "</htm".

I run amule CVS (20051024) on Linux on an EV56 alpha machine (debian).

The HTTP-RFC states that all linefeeds in the HTTP Headers must be \n\r, not mixed or anything else. Content-Length must be counted after that.

Some images sometimes appear also destroyed.
No tags attached.
Issue History
2005-10-30 12:13thetaphiNew Issue
2005-10-30 12:18thetaphiNote Added: 0001377
2005-10-30 13:19thetaphiNote Added: 0001378
2005-10-30 17:00XaignarStatusnew => assigned
2005-10-30 17:00XaignarAssigned To => lfroen
2005-10-30 18:23thetaphiNote Added: 0001382
2005-11-27 22:08XaignarStatusassigned => resolved
2005-11-27 22:08XaignarFixed in Version => CVS
2005-11-27 22:08XaignarResolutionopen => fixed
2005-11-27 22:08XaignarNote Added: 0001519

Notes
(0001377)
thetaphi   
2005-10-30 12:18   
Sorry it must be \r\n for HTTP headers, just a misspelling...
(0001378)
thetaphi   
2005-10-30 13:19   
This does not appear in the PHP templates. It would be good to have a option to supply amuled or the config file amule.conf with the template name that the automatic start of amuleweb can get the correct template name.
(0001382)
thetaphi   
2005-10-30 18:23   
With the PHP amule web part (with or without zlib enabled) the problem occurs sometimes, too. Aditionally sometimes garbage is appended to the end of the sent file.
(0001519)
Xaignar   
2005-11-27 22:08   
A fix has been committed for this. Please let us know if you still experience the problem.