cappuccino/cappuccino — pull request #1510 by cheezcake (2012-04-19 21:50:13+00:00)
Title: Baseline initalization for CPURLRequest in -(id) init; method

Hi,

I recently spent about an hour and a half trying to figure out why my CPURLRequest would not take headers when created like this:

var req = [[CPURLRequest alloc] init];

[req setURL: [CPURL URLWithString: @"http://google.com"]];

[req setValue: @"application/x-www-form-urlencoded" forHTTPHeaderField: @"Content-Type"];

It turns out that init does not properly create the datastructures in memory, even though I followed all the technical procedures. I realize init is not the designated initializer, but memory should be in a writable state at least when an object is created.

Thanks!

++ Briam R.