[Bug 326208] New: libcurl forces "pragma: no-cache" which makes libzypp not play well with squid
https://bugzilla.novell.com/show_bug.cgi?id=326208 Summary: libcurl forces "pragma: no-cache" which makes libzypp not play well with squid Product: openSUSE 10.3 Version: Beta 3 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: libzypp AssignedTo: kkaempf@novell.com ReportedBy: jmichael@novell.com QAContact: kkaempf@novell.com Found By: --- By default, libcurl adds "Pragma: no-cache" to every web request which forces squid to re-fetch everything no matter if it's changed or not. We specifically set up a squid proxy with large cache sizes to lessen the pain of upgrading multiple machines in the office that are all tracking factory, but the forced no-caching prevents that from helping and results in far more network usage than it should. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=326208#c1
--- Comment #1 from Michal Marek
https://bugzilla.novell.com/show_bug.cgi?id=326208
Klaus Kämpf
https://bugzilla.novell.com/show_bug.cgi?id=326208#c2
--- Comment #2 from Peter Poeml
https://bugzilla.novell.com/show_bug.cgi?id=326208
Duncan Mac-Vicar
https://bugzilla.novell.com/show_bug.cgi?id=326208
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=326208
User mmarek@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c3
Michal Marek
https://bugzilla.novell.com/show_bug.cgi?id=326208
Duncan Mac-Vicar
https://bugzilla.novell.com/show_bug.cgi?id=326208
User crrodriguez@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c4
--- Comment #4 from Cristian Rodriguez
I initially thought this would be an anachronism of zypp, but surprising enough, it is indeed the default behaviour of curl. (Listed in the FAQ even...)
Do you know what is the rationale on it ? sounds quite strange to me..
repomd.xml is special. It is small enough to simply fetch it. And since it contains hashes over all other (rpm-md) metadata files, it saves revalidation on the other metadata files.
yes, but IMHO it should be retrived the same way, if HTTP code 304 is the response then it simple uses the repomd.xml already stored on disk. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=326208
User jnelson-suse@jamponi.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c5
Jon Nelson
https://bugzilla.novell.com/show_bug.cgi?id=326208
User jnelson-suse@jamponi.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c6
--- Comment #6 from Jon Nelson
From the strace (grepping for Pragma)
6291 read(5, "header \"Pragma:\"\n", 8191) = 17 6291 sendto(6, "GET http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.0/repo... HTTP/1.1\r\nProxy-Authorization: Basic Og==\r\nUser-Agent: ZYpp 4.27.3 (curl 7.18.1)\r\nHost: download.opensuse.org\r\nPragma: no-cache\r\nAccept: */*\r\nProxy-Connection: Keep-Alive\r\nIf-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT\r\n\r\n", 320, MSG_NOSIGNAL, NULL, 0) = 320 Furthermore, why it is it sending Proxy-Authorization at all? The proxy does not require auth! The string Og== decodes to a ':' (sans quotes) which means no username and no password. Some proxies would get confused at the presence of a Proxy-Authorization header if one has not been requested. Clearly the request is using If-Modified-Since (with the WRONG DATE). What is going on here? Using the squid option (NOT recommended) "reload_into_ims on" I was able to correct the bad curl (and zypp) usage but it's a total kluge. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=326208
User jnelson-suse@jamponi.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c7
--- Comment #7 from Jon Nelson
https://bugzilla.novell.com/show_bug.cgi?id=326208
User crrodriguez@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c8
--- Comment #8 from Cristian Rodríguez
Furthermore, why it is it sending Proxy-Authorization at all? The proxy does not require auth!
new bug report please.
Clearly the request is using If-Modified-Since (with the WRONG DATE).
huh!.. it is using the Unix Epoch, other new bug report...
What is going on here?
We have bugs :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=326208
User crrodriguez@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c9
--- Comment #9 from Cristian Rodríguez
If it was using If-Modified-Since (or etags) correctly, it would not need the HEAD request at all.
Right, but that is, as far as I know a design flaw :-( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=326208
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=326208
User dmacvicar@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c10
Duncan Mac-Vicar
https://bugzilla.novell.com/show_bug.cgi?id=326208
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c11
Ján Kupec
https://bugzilla.novell.com/show_bug.cgi?id=326208
User jkupec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=326208#c12
Ján Kupec
participants (1)
-
bugzilla_noreply@novell.com