Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ASP

Content-Type header

 

 

ModPerl asp RSS feed   Index | Next | Previous | View Threaded


momex2000 at hotmail

Nov 25, 2008, 9:31 AM

Post #1 of 2 (3620 views)
Permalink
Content-Type header

Hi,

Back in June 2006, I asked about the content-type header as it relates to a form post from a mobile phone browser. The original message that I sent can be seen here: http://mail-archives.apache.org/mod_mbox/perl-asp/200606.mbox/%3CBAY113-F338CCAE926ACAC394078A3BF7A0 [at] phx%3E

In a nutshell, in most situations, the browser will send the content-type header as 'application/x-www-form-urlencoded' but some browsers under certain circumstances, add additional information at the end of the content-type header string. In particular, Firefox 3 is sending 'application/x-www-form-urlencoded; charset=UTF-8' when a POST request is initiated through AJAX. This causes the form elements being submitted in AJAX to be ignored.

I manually did a change on the Apache::ASP::Request module to correct this problem, changing the line

if($headers_in->get('Content-Type') eq 'application/x-www-form-urlencoded')

to

if($headers_in->get('Content-Type') =~ m|^application/x-www-form-urlencoded|) {

which solved the problem. However, as the change wasn't bundled into Apache::ASP back then, I'm wondering if there's something else I should be doing to solve this problem?

Thanks for any feedback.

.rw


_________________________________________________________________


tsirkin at gmail

Aug 11, 2011, 5:14 AM

Post #2 of 2 (937 views)
Permalink
Re: Content-Type header [In reply to]

Dear Rock the Kazbah and the list,
I was just hit by this problem when using ajax request with firefox .
(I know this mail is REALLY old )
Anyway ,for those guys ,like myself ,that are supporting ,applications
written with
apache::asp ,there are must be somebody that at least will have write
permissions
to the module on CPAN .
As an example this Content-Type bug from 2008 totally breaks ajax post
request from firefox.
There is a simple fix ,but we need somebody to apply it.
Thanks.
Evgeny


On Tue, Nov 25, 2008 at 8:31 PM, Rock the Kazbah <momex2000 [at] hotmail>wrote:

> Hi,
>
> Back in June 2006, I asked about the content-type header as it relates to a
> form post from a mobile phone browser. The original message that I sent can
> be seen here:
> http://mail-archives.apache.org/mod_mbox/perl-asp/200606.mbox/%3CBAY113-F338CCAE926ACAC394078A3BF7A0 [at] phx%3E
>
> In a nutshell, in most situations, the browser will send the content-type
> header as 'application/x-www-form-urlencoded' but some browsers under
> certain circumstances, add additional information at the end of the
> content-type header string. In particular, Firefox 3 is sending
> 'application/x-www-form-urlencoded; charset=UTF-8' when a POST request is
> initiated through AJAX. This causes the form elements being submitted in
> AJAX to be ignored.
>
> I manually did a change on the Apache::ASP::Request module to correct this
> problem, changing the line
>
> if($headers_in->get('Content-Type') eq
> 'application/x-www-form-urlencoded')
>
> to
>
> if($headers_in->get('Content-Type') =~
> m|^application/x-www-form-urlencoded|) {
>
> which solved the problem. However, as the change wasn't bundled into
> Apache::ASP back then, I'm wondering if there's something else I should be
> doing to solve this problem?
>
> Thanks for any feedback.
>
> .rw
>
>
> ------------------------------
> Win a trip with your 3 best buddies. Enter today.<http://www.messengerbuddies.ca/?ocid=BUDDYOMATICENCA19>
>

ModPerl asp RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.