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

Support for SOAP requests that get a response with header X-Note: Gat… #335

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nicodemuz
Copy link
Contributor

Support for SOAP requests that get a response with header X-Note: Gateway Ack

Context

I was having an issue similar to:
#134

The response was being stored wrongly due to an extra HTTP header:

-
    request:
        method: POST
        url: 'https://www.example.com/dummy'
        headers:
            Host: www.example.com
            Content-Type: 'text/xml; charset=utf-8;'
            SOAPAction: ''
        body: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<SOAP-ENV:Envelope ...>...</SOAP-ENV:Envelope>\n"
    response:
        status:
            http_version: '1.1'
            code: '100'
            message: Continue
        headers:
            X-Note: 'Gateway Ack'
        body: "HTTP/1.1 200 OK\r\nX-Backside-Transport: OK OK,OK OK\r\nConnection: Keep-Alive\r\nTransfer-Encoding: chunked\r\nContent-Type: text/xml\r\nCache-Control: no-cache\r\nDate: Fri, 11 Dec 2020 14:05:38 GMT\r\nX-Global-Transaction-ID: e0ffe2255fd37cb213bc15d2\r\nStrict-Transport-Security: max-age=157680000\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<soapenv:Envelope ...>...</soapenv:Envelope>"
        curl_info:
            url: 'https://...'
            content_type: text/xml
            http_code: 200
            header_size: 449
            request_size: 176
            filetime: -1
            ssl_verify_result: 0
            redirect_count: 0
            total_time: 1.148834
            namelookup_time: 0.00284
            connect_time: 0.213268
            pretransfer_time: 0.646295
            size_upload: !!float 6547
            size_download: !!float 8349
            speed_download: !!float 7272
            speed_upload: !!float 5702
            download_content_length: !!float -1
            upload_content_length: !!float 6547
            starttransfer_time: 0.856235
            redirect_time: !!float 0
            redirect_url: ''
            primary_ip: 123.123.123.123
            certinfo: {  }
            primary_port: 443
            local_ip: 123.123.123.123
            local_port: 39628
            http_version: 2
            protocol: 2
            ssl_verifyresult: 0
            scheme: HTTPS
            appconnect_time_us: 646243
            connect_time_us: 213268
            namelookup_time_us: 2840
            pretransfer_time_us: 646295
            redirect_time_us: 0
            starttransfer_time_us: 856235
            total_time_us: 1148834

What has been done

  • Handle specific case for this header.

Todo

  • Consider removing all headers that start with "X-*" for HTTP 100 Continue.

@ghost
Copy link

ghost commented Mar 8, 2021

Looks good. Could we get this merged?

@JeroenVanOort
Copy link
Member

Looks good to me. Could you add a test for this and rebase on the current master? Travis should succeed.

@nicodemuz
Copy link
Contributor Author

Rebased and resolved conflict with master.

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

Successfully merging this pull request may close these issues.

None yet

2 participants