Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4641

TCurlClient doesn't check for HTTP status code

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: PHP - Library
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Flags:
      Patch

      Description

      TCurlClient doesn't check for HTTP status code. Other languages, such as Go and Java do check for it. This can lead to potentially wrong exception being thrown: TProtocolException instead of TTransportException. To be more precise, TCurlTransport doesn't error out and Protocol starts to parse response, which may lead to TProtocolException. For example, AWS ALB may return 502 Bad Gateway with HTML as part of payload when there's an issue with an upstream. In such case, a client may want to retry but it only makes sense if there's a transport exception.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jking3 James E. King III
                Reporter:
                sokac Josip Sokcevic
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: