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

session.post return None when server return http error code #68

Open
jerryyyq opened this issue Apr 3, 2023 · 0 comments
Open

session.post return None when server return http error code #68

jerryyyq opened this issue Apr 3, 2023 · 0 comments

Comments

@jerryyyq
Copy link

jerryyyq commented Apr 3, 2023

session.post return None when server return http error code
example curl get 400 code:

curl --unix-socket /tmp/.kavhttpd -i -X POST -H "Content-Type:application/json" -d '{"object":"/home/dpdk-17.11.1-3.10.0_693.el7.x86_64.aaarpm"}' http://localhost/api/v3.0/scanfile
HTTP/1.0 400 Bad Request
Connection: close
Content-Type: text/plain
Server: KAVHTTPD/1.0
X-KAV-ProtocolVersion: 3
Date: Mon, 03 Apr 2023 07:01:47 GMT
Content-Length: 42

{
    "error": "Cannot scan not a file"
}

At this scene, if use requests_unixsocket session to post, I get the return is None, I can't get the http response code or content..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant