[Spacewalk-list] Proxy configuration - 1.0
Michael Mraka
michael.mraka at redhat.com
Mon Jun 28 12:34:51 UTC 2010
Marcus Moeller wrote:
% 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.
Hi Marcus & Tom,
could you please file a bugzilla? I'm not sure what's reproducer here.
Is it RHEL / CentOs 5 server or Fedora (i.e. running mod_python or
mod_wsgi)?
Thanks,
Michael
% 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
--
Michael Mráka
Satellite Engineering, Red Hat
More information about the Spacewalk-list
mailing list