Skip to content

HTTP2 post request response is inconsistent #1506

Closed

Description

@Private-SO

When i am testing an HTTPS endpoint. i am getting an inconsistent response. Some times i am getting correct response sometimes i am getting below error. its pretty random..
httpx.RemoteProtocolError: <StreamReset stream_id:1, error_code:ErrorCodes.INTERNAL_ERROR, remote_reset:True> Fatal error on SSL transport protocol: <asyncio.sslproto.SSLProtocol object at 0x000002377FC0D2B0> transport: <_ProactorSocketTransport fd=360 read=<_OverlappedFuture cancelled>> AttributeError: 'NoneType' object has no attribute 'send' Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x000002377FB3F3A0>

Below is my code

import httpx
r = httpx.Client(http2=True,verify=False)
response = r.post('https://aws-xxx.us-east-1.elb.amazonaws.com/version')
print(response.text)

I also tried using AsyncClient below is the code for it

import httpx
import asyncio
# r = httpx.AsyncClient(http2=True,verify=False)
async def testfun():
  async with httpx.AsyncClient(http2=True, verify=False) as client:
    r = await client.post('https://aws-xxx.us-east-1.elb.amazonaws.com/version')
  print(r)
asyncio.run(testfun())

I have tested this in my pycharm environment with python verion 3.8.0. Let me know if you need any further information.

Activity

  1. florimondmanca commented on Mar 13, 2021

    @florimondmanca
    Contributor

    @Private-SO Hey,

    If you'd like folks to give a helping hand, could you please follow and fill in the issue template? There's important information there that needs communicating anyway to troubleshoot situations like these. Thank you!

  2. locked and limited conversation to collaborators on Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions