[Yum-devel] enable yum to pass http data to repository
Bryan Mills
bryan at mills1.net
Thu Nov 10 00:16:03 UTC 2005
David Lutterkort wrote:
>On Wed, 2005-11-09 at 18:13 -0500, Bryan Mills wrote:
>
>
>>This is a patch to enable yum to pass http data to the yum repository.
>>Thanks to the recent changes in urlgrabber this is easy.
>>
>>My need was to enable secure access to a local yum repository.
>>
>>
>
>If I understand your patch right, the http_data is used to send request
>parameters to the server; how about changing it so that you can provide
>a base url with request parameters, i.e., make it so that yum
>understands a URL of the form
>http://server.example.com/path?login=bryan&password=passwd
>
>
The question in this case would be should I do a POST or GET? I think
both syntax should be available so maybe the scheme you suggest would be
GET and I would rename my extra config parameter to http_post_data or
something like that.
>The sticky part is to make sure that yum properly appends a relative
>portion to the base url (e.g., in Repository.get), i.e. that the
>relative part gets put into the base URL before the params.
>
>
urlparse.urlsplit can do that for us. Then just feed everything but the
query and fragment in as the base url.
If we implement this method as a GET then the tricky part will be
appending the query and fragment pieces onto the end of each request url.
>That way, there's no need to introduce a new config param, and you can
>use these types of URLs in mirrorlists, too.
>
>
Agreed.
>
>
>>A similar thing should be done to enable http authentication but that
>>involves a bit more work.
>>
>>
>
>That seems to work already if you specify the URL as
> http://user:passwd@server.example.com/path
>
>
Duh, forgot that urlgrabber already supported that.
-bryan
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Yum-devel mailing list
>Yum-devel at linux.duke.edu
>https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
>
>
More information about the Yum-devel
mailing list