This is a migrated thread and some comments may be shown as answers.

unreliable encrypted data transmission

5 Answers 398 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Pascal
Top achievements
Rank 1
Pascal asked on 21 Dec 2015, 04:08 PM

Hi, I got a working webservice to which I am sendig SOAP-requests. The server demands authentication of the client and authenticates itself to the client via X509-certificates. I've successfully used fiddler as a proxy to send requests to this service and watch the transmitted content by decrypting it with fiddler.

However it turns out that fiddler fails to transmit the requests if they start to get larger. For example a request with 200kb does still work and there are no problems but if I extend the request up to 300 kb it fails with fiddler throwing the following exception:

HTTP/1.1 504 Fiddler - Receive Failure
Date: Mon, 21 Dec 2015 16:05:50 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Cache-Control: no-cache, must-revalidate
Timestamp: 17:05:50.804

[Fiddler] ReadResponse() failed: The server did not return a complete response for this request. Server returned 0 bytes.

 

The request works though if I do not use fiddler. So whats the problem here? May it have to do something with the chunks of the request? I had some problems with chunking before that have led to the exact same error message. But I wouldn't know how to resolve this within fiddler...

5 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 21 Dec 2015, 06:53 PM
Hello, Pascal--

Unfortunately, I don't have enough to go on. Are you simply sending the requests (from some client application) through Fiddler? Or are you sending them via Fiddler's Composer?

How is the client authenticating to the server specifically?

The error message here: "[Fiddler] ReadResponse() failed: The server did not return a complete response for this request. Server returned 0 bytes."

...literally means that Fiddler sent the request and the server closed the connection without returning any content. This typically indicates a server bug of some type, although it could also happen in the event of a misconfiguration like a network timeout.

If you have a SAZ file of the traffic in question, I'd be happy to have a look (click Help > Send Feedback to send it to me).

Regards,
Eric Lawrence
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pascal
Top achievements
Rank 1
answered on 23 Dec 2015, 09:39 PM

Hi,

I will try to explain my problem in detail. I hope I will be able to make it clear.

I got programmed a Java-JAX-WS-Client that can communicate with a specific server application that I have no direct access to.

The server demands a TLS-connection and authentication via client certificate. For this I got a Java-KeyStore for using the corresponding test-system. I am able to authenticate on the server and send my requests without any problems as long as the requests do not become larger than 4000 Bytes. If the request becomes larger the server will also throw the exception I mentioned above. The solution for this problem was to change the HTTP-header and add the value "Transfer-Encoding: chunked" and set the chunk-size <= 4000  Bytes.

So much for this. Now I wanted to to peek into my requests to see the full http-request and therefore I used the fiddler windows client as debug proxy. I enabled capturing https-connections and decrypting them. I installed my translated my Java-Keystore to PKCS12 and installed it under "certmgr.msc" while putting the ClientCertificate.cer at he requested location. I told my Java Client now to trust the fiddler certificate as trustworthy instance and set proxy location too "localhost:8888". Then I have send my request via the Java-client. fiddler is successfully decrypting the request and forwarding it to the given server. Everything here works fine for as long as the requests are smaller than 4000 Bytes. Eventhough I've set the HTTP-header "Transfer-Encoding: chunked" I still get the above error message. The only solution here I can come up with is that fiddler is not chunking my request when forwarding to the server since it does work if I do not use fiddler as debug proxy.

 

Obiously english is not my native language and I hope I could clearly describe the problem :-)

0
Eric Lawrence
Telerik team
answered on 23 Dec 2015, 10:12 PM
Ah-- I think I understand what you're saying. It's possible that the server is getting the entire message from Fiddler in one packet and rejecting it because it's too large (Fiddler sends the entire request as quickly as it can).

If you click Rules > Performance > Simulate Modem Speeds, does the problem go away? That will cause Fiddler to send the request in 1kb blocks with a delay between each (if this works, we can adjust the delay so it's not so long).

Regards,
Eric Lawrence
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pascal
Top achievements
Rank 1
answered on 24 Dec 2015, 09:59 AM

this works. Thx a lot.

It would also be nice to know how to adjust the size of the packets for the transmission with a 3MB request takes quiet some time.

But at least the problem itself is solved :-) thx a lot

0
Eric Lawrence
Telerik team
answered on 24 Dec 2015, 05:59 PM
Hi--

The packet sizing isn't configurable, but the delay is. Click Rules > Customize Rules. Change the block from

            if (m_SimulateModem) {
                // Delay sends by 300ms per KB uploaded.
                oSession["request-trickle-delay"] = "300"; 
                // Delay receives by 150ms per KB downloaded.
                oSession["response-trickle-delay"] = "150"; 
            }

to e.g.

            if (m_SimulateModem) {
                // Delay sends by 1ms per KB uploaded.
                oSession["request-trickle-delay"] = "1"; 
                // Delay receives by 150ms per KB downloaded.
                oSession["response-trickle-delay"] = "1"; 
            }

Regards,
Eric Lawrence
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Windows
Asked by
Pascal
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Pascal
Top achievements
Rank 1
Share this question
or