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

HTTPie could be lead to believe data was passed in stdin when it was not #1551

Closed
Ousret opened this issue Jan 10, 2024 · 1 comment
Closed
Labels
bug Something isn't working new Needs triage. Comments are welcome!

Comments

@Ousret
Copy link

Ousret commented Jan 10, 2024

Minimal reproduction code and steps

FROM python:3.11

RUN pip install httpie
$ docker build -t httpie .
$ docker run httpie https pie.dev/get

Current result

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>

Expected result

Well, not sending a POST request.


The condition, that verify stdin data is insufficient, unfortunately. Containerized environments seems to be the most concerned at the time. Due to the missing "interactive" mode.

# see argparser.py
self.has_stdin_data = (
    self.env.stdin
    and not self.args.ignore_stdin
    and not self.env.stdin_isatty
)

A fix has been created.

@Ousret Ousret added bug Something isn't working new Needs triage. Comments are welcome! labels Jan 10, 2024
@Ousret

This comment was marked as spam.

@Ousret Ousret closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new Needs triage. Comments are welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant