Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to forward POST data on redirects #58546

Open
beerNuts mannequin opened this issue Mar 16, 2012 · 3 comments
Open

Document how to forward POST data on redirects #58546

beerNuts mannequin opened this issue Mar 16, 2012 · 3 comments
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes docs Documentation in the Doc dir easy type-feature A feature request or enhancement

Comments

@beerNuts
Copy link
Mannequin

beerNuts mannequin commented Mar 16, 2012

BPO 14338
Nosy @orsenthil, @merwok

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2012-03-16.20:25:01.281>
labels = ['easy', '3.8', '3.9', '3.10', 'type-feature', 'docs']
title = 'Document how to forward POST data on redirects'
updated_at = <Date 2020-11-16.00:01:26.251>
user = 'https://bugs.python.org/beerNuts'

bugs.python.org fields:

activity = <Date 2020-11-16.00:01:26.251>
actor = 'iritkatriel'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2012-03-16.20:25:01.281>
creator = 'beerNuts'
dependencies = []
files = []
hgrepos = []
issue_num = 14338
keywords = ['easy (C)']
message_count = 3.0
messages = ['156080', '156108', '156346']
nosy_count = 5.0
nosy_names = ['orsenthil', 'eric.araujo', 'docs@python', 'crustymonkey', 'beerNuts']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue14338'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

@beerNuts
Copy link
Mannequin Author

beerNuts mannequin commented Mar 16, 2012

Issue bpo-14144, with the title "urllib2 HTTPRedirectHandler not forwarding POST data in redirect" was recently closed with these comments:

"This could be cookbook recipe style example, if it's utility
value is high. I am closing this issue as I feel that the requirement may not be addressed by a change. If there is patch for HowTo, we can tackle that in another issue. Thank you for contribution."

The decision that documents on this issue were preferable to a patch seems like a fair compromise, especially considering that the RFC is decidedly ambiguous.I was wondering if the HowTo would be forthcoming?
It seems to me that the value/utility would certainly be high. I'd submit it myself but I'm so new to Python that I don't trust my ability to do it correctly. It's something I would find highly useful, though.

@beerNuts beerNuts mannequin assigned docspython Mar 16, 2012
@beerNuts beerNuts mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Mar 16, 2012
@merwok
Copy link
Member

merwok commented Mar 16, 2012

The idea is to add a short example in Doc/howto/urllib2.rst. Senthil explained how to do things on bpo-14144 (“obtain the redirected URL and then POST to [it]”), and the example should be introduced by a clear warning about security/misbehavior risks (this is why I’m not adding the “easy” keyword to this report).

If you would like to propose a patch, you can find instructions on how to get and edit the source for the docs in the devguide. You can also write to the beginner-friendly core-mentorship mailing list (link in the devguide or on mail.python.org) to request help or guidance.

@merwok merwok changed the title urllib2 HowTo for overriding post/3xx behavior. Document how to forward POST data on redirects Mar 16, 2012
@crustymonkey
Copy link
Mannequin

crustymonkey mannequin commented Mar 19, 2012

I actually just worked around this issue in my library to do specifically what I needed it to do, which was an automatic redirect POST with data. As far as general recipes are concerned, anyone could just follow what I did in my library at:

https://github.com/crustymonkey/py-sonic or
http://pypi.python.org/pypi/py-sonic

All I did was just subclass HTTPRedirectHandler and essentially add my patch.

@iritkatriel iritkatriel added easy 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes labels Nov 16, 2020
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes docs Documentation in the Doc dir easy type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants