[Spacewalk-list] Proxy configuration - 1.0
Marcus Moeller
mail at marcus-moeller.de
Fri Jun 25 13:59:31 UTC 2010
Dear Tom,
>> confirmed - 0.8 is OK 1.0 fails. No traceback no nothing just cant
>> download rpm's
>>
>> Not really sure where to start looking for this one as there are
>> seemingly no errors
>
> so the issue is in /usr/share/rhn/proxy/rhnShared.py
Thanks for the update.
Taking the thread back to the list so one of the devs could take care about.
Greets
Marcus
...
> This is a code snippet from the 0.8 proxy that works
>
> # Put the headers into the output connection object
> http_connection = self.responseContext.getConnection()
> for (k, vals) in hdrs.items():
> if string.lower(k) == 'host':
> # Filtering this header, the connection object takes care of
> # it
> continue
> if type(vals) not in (ListType, TupleType):
> vals = [vals]
> for v in vals:
> log_debug(5, "Outgoing header", k, v)
> http_connection.putheader(k, v)
> http_connection.endheaders()
>
>
> This is the same bit from 1.0 which does not work
>
> http_connection = self.responseContext.getConnection()
> for (k, vals) in hdrs.items():
> if string.lower(k) in ['content_length', 'content_type']:
> # mod_wsgi modifies incoming headers so we have to
> transform them back
> k = k.replace('_','-')
> if not (string.lower(k)[:2] == 'x-' or
> string.lower(k) in ['content-length',
> 'user-agent', 'content-type']):
> # filter out header we don't want to send
> continue
> if type(vals) not in (ListType, TupleType):
> vals = [vals]
> for v in vals:
> log_debug(5, "Outgoing header", k, v)
> http_connection.putheader(k, v)
> http_connection.endheaders()
>
> Replacing that section in 1.0 with the 0.8 and it works again
More information about the Spacewalk-list
mailing list