Products

Price/Order

Support

Partners

Testimonials

Test Results

About us

Contact
 Getting unhandled header information at client
Bottom
 
Total posts: 6
 Author Getting unhandled header information at client
Jerry Hayes

20.09.2006 18:30:49
Registered user
Danijel,

I've got a client data request that was not accepted by the server (correct behavior here), and now I want to get at the header information of the request.

I get notification in the client OnResponseAbort, but all the request information has been cleared at this point.

Any ideas?

Thanks,

Jerry
Danijel Tkalcec [RTC]

20.09.2006 18:55:10
Registered user
How did you send the request?

1) If it was a remote function call and you have activated automatic encryption, the request that is being aborted was inserted by the rtcClientModule to prepare the Session for encryption, it wasn't your own request.

2) The OnResponseAbort event is called after the OnRepostCheck and means that the request will not be re-posted. If you need to make some decisions and maybe even repost the request, you should be doing this from the OnRepostCheck event.

3) Starting from RTC SDK 1.9l, you will receive the OnResponseAbort event when "useProxy=False" and the Server is unreachable (connection was not possible), even before a Request was prepared for sending. In that case, there will be no information in the Request object.

PS. If you give me more information about what you are trying to do, I might be able to point you to the right direction.

Best Regards,
Danijel Tkalcec
Jerry Hayes

20.09.2006 19:39:08
Registered user
More detail below...

* It's being called from a RtcDataRequest.
* It's not something that would ever need to be reposted; because it was not accepted by the server handlers.  It reaches the server fine, the server just does not do a request.accepted.
* Server not accepting is planned behavior; part of my security integration testing.

Thanks as always,

Jerry
Danijel Tkalcec [RTC]

20.09.2006 20:08:52
Registered user
I can't seem to reproduce your problem.

I have just written a short app with RTC client and server components, where Server doesn't do anything (never accepts any requests), Client sends a simple Request and gets the "OnResponseAbort" event, but it does have access to the complete Request object. Even if the Server was not listening, thus the request could not be sent, I got the complete request info in the OnResponseAbort event. And ... if I posted multiple requests, I got a separate OnResponseAbort event for each request, with access to each request info.

Can you send me your example by E-Mail, so I can see what is different in your case and debug the code to find the problem?

Thanks!

Best Regards,
Danijel Tkalcec
Jerry Hayes

20.09.2006 20:17:21
Registered user
Well, I shut everything down here and came back up and now it's ok.   AAARRRGH.

Sorry for the wild goose chase; think it was one of those old "debugging multi-threaded socket apps in the IDE" issues.
I've verified that I get it now in BOTH the repost check AND the Abort.

As long as I've got your attention, a quickie...

If I have a client SENDING a large stream via a RtcDataRequest and the server wants to deny the acceptance, it's proper for the server to just .disconnect here, because it has no way of resolving the incoming stream.  Correct?

Sorry again about the chase,

Jerry
Danijel Tkalcec [RTC]

20.09.2006 20:29:16
Registered user
If the Server doesn't want to accept the incoming request (or it starts getting more data than it wants to handle), I'd say it's OK to close the connection rather than wait for all the unwanted data to flow through the connection. Default implementation in the RTC SDK for requests which aren't being accepted is to close the connection.

But, it's entirely up to you to decide what you want to do with unwanted requests. You can as well read all the data from the client (calling "Sender.Read;" in the OnDataReceived event) without storing it, then sending a response like "404 Error".

Best Regards,
Danijel Tkalcec