Issues with network.request() headers in Corona 2013.1076--works in Corona 2012.971

Hi,

I’m having issues with a POST network.request() in Corona 2013.1076

The code is working just fine in Corona 2012.971 but the same code does not work correctly in 2013.1076

The summary is that if I include a header Authorization parameter in 2013.1076, then the body data is not processed correctly, but if I leave the header parameter out, it works fine and I can access the body parameters on the server.

Has anyone else seen something similar?  Does anyone know of a workaround or fix?

Hi,

I have the same problem. I’ve submited bug report but haven’t heard back yet. Hope it will get fixed soon.

Hi ugi4l,

When did you submit the bug report?

Hi,

unfortunately I have no solution or workaround… but I can confirm this behavior! At least you’re not alone with this problem… :wink:

Laryllan

Hi,

I submited it around 10 days ago… Still haven’t heard back.

Does anyone from the Corona Staff have a comment on this one?  Is this a known regression that you folks are trying to fix?  Do you need more info?

What is your bug ID #

o.k. I submitted a bug using this form (http://developer.coronalabs.com/content/bug-submission) and it did not give me a bug ID #.  I received an e-mail referencing Case 22937–is that the number you need?  

ugi4l:  Do you also have a case number that you can reference?

Hello,
@ugi41 and @admin920
 

Starting with build 1053 we added a default Content-Type field of “Text/plain” for all platforms. This was done to be consistence among the platforms. Both test code programs submitted can be fixed by adding the following header:

headers[“Content-Type”] = “application/x-www-form-urlencoded”

This was needed because of the authorization fields included in the body.

Adding the above line of code to your test app, now works with the current daily build, 1093, and makes it act the same as before the change (in build 1053).

Regards,
Tom

Thanks, Tom.  I’ve verified that your suggested change has resolved my issue

Hi,

I have the same problem. I’ve submited bug report but haven’t heard back yet. Hope it will get fixed soon.

Hi ugi4l,

When did you submit the bug report?

Hi,

unfortunately I have no solution or workaround… but I can confirm this behavior! At least you’re not alone with this problem… :wink:

Laryllan

Hi,

I submited it around 10 days ago… Still haven’t heard back.

Does anyone from the Corona Staff have a comment on this one?  Is this a known regression that you folks are trying to fix?  Do you need more info?

What is your bug ID #

o.k. I submitted a bug using this form (http://developer.coronalabs.com/content/bug-submission) and it did not give me a bug ID #.  I received an e-mail referencing Case 22937–is that the number you need?  

ugi4l:  Do you also have a case number that you can reference?

Hello,
@ugi41 and @admin920
 

Starting with build 1053 we added a default Content-Type field of “Text/plain” for all platforms. This was done to be consistence among the platforms. Both test code programs submitted can be fixed by adding the following header:

headers[“Content-Type”] = “application/x-www-form-urlencoded”

This was needed because of the authorization fields included in the body.

Adding the above line of code to your test app, now works with the current daily build, 1093, and makes it act the same as before the change (in build 1053).

Regards,
Tom

Thanks, Tom.  I’ve verified that your suggested change has resolved my issue