[webkit-dev] problem with ajax POSTs generated from Webkit

Darin Adler darin at apple.com
Mon Feb 23 01:22:59 PST 2009


On Feb 18, 2009, at 11:11 PM, Steve Conover wrote:

> When I kick off an ajax POST from my webpage and see what comes  
> through in my Protocol, it's an NSURLRequest (not  
> NSMutableURLRequest) with nil HTTPBody, HTTPBodyStream, and  
> HTTPBodyStreamForTransmission properties.  The post body is nowhere  
> to be seen.  Where should I be looking?

It should be in either HTTPBody or HTTPBodyStream. The code that sets  
it up inside WebKit is the setHTTPBody function inside the  
FormDataStreamMac.mm source file, in case you're building your own  
WebKit and debugging with that.

You should make a small test application to demonstrate what's not  
working. Then you can either file a bug, or the process of trying to  
make a small test will show you what's going wrong in your application.

> Should ajax requests be coming through just like other requests?

Yes.

> Is this (the NSURLProtocol) the appropriate place to be overriding  
> request/connection infrastructure and providing my own implementation,

Yes.

     -- Darin



More information about the webkit-dev mailing list