Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 33386

Summary: libghttp uses LC_NUMERIC (your locale) for the delimiter in the http protocol version number (in german 1,1 instead of 1.1)
Product: Gentoo Linux Reporter: Helmar Wieland <heldhelm>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Helmar Wieland 2003-11-13 05:46:47 UTC
Okay, i encountered this bug when grip (linked against libghttp) failed to
download some album info. I used ethereal to capture the corresponding packages,
and noticed that libghttp has an incredible stupid bug:

It uses your current locale for the http version number! It did indeed specify
"HTTP/1,1" instead "HTTP/1.1". And sometimes (not always) apache then responds
with a 400, in my case resulting in the failed freedb query.
The workaround is of course easy: #> export LC_LOCALE="en"

Doing some research it seems like libghttp is no longer developed. No changes
for years, i can only wonder why, since this bug is simply too obvious. But i
think debian stable uses a patched version, so it shouldn't be too difficult to
use that patch in gentoo, too.

Greetings and thanks for the great work!

Reproducible: Always
Steps to Reproduce:
1. use libghttp with LC_NUMERIC="de" (for example)

Actual Results:  
wonder about the wrong HTTP protocol version delimiter (in this case a comma).

Expected Results:  
it should always be HTTP/1.1

root@hal:~# emerge -pv libghttp  

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] gnome-base/libghttp-1.0.9-r3
Comment 1 Helmar Wieland 2003-11-13 05:57:06 UTC
Sorry, the workaround is of course
#> export LC_NUMERIC="en"
and not
#> export LC_LOCALE="en"

And i'll post an article in the forum explaining this workaround for other users encountering this bug.
Comment 2 Helmar Wieland 2003-11-13 06:27:47 UTC
I'm at least as stupid as this bug, and very sorry, but "en" is of course *no* valid locale string, you should of course use "en_US" or sth.
Comment 3 foser (RETIRED) gentoo-dev 2003-11-15 11:30:02 UTC
got a patch by any chance ? (diff -uN preferably)
Comment 4 foser (RETIRED) gentoo-dev 2003-12-07 08:31:12 UTC
ok i found a patch somewhere and added it to libghttp-1.0.9-r4, please update and test if it fixes your problems ?

This would be seriously faster handled if you had also provided the patch, please try to help us out as much as possible. Don't just describe the problem, but also provide the patch you are talking about.
Comment 5 Helmar Wieland 2003-12-07 14:38:51 UTC
I tested it, and the patch fixes the problem. And the patch itself looks good, too.

I'm also sorry about not providing the patch with the bug report, i'll try to do that next time. Especially since i had one around (although that one included more changes).
Comment 6 Helmar Wieland 2004-05-18 02:55:11 UTC
I wonder if 1.0.9-r4 couldn't be marked stable for x86, especially since it already has been for sparc and alpha and there's only minimal change.
Comment 7 foser (RETIRED) gentoo-dev 2004-05-20 06:34:26 UTC
noted.. stable x86 now