Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12514 closed bug (invalid)

.ajax() headers not set in IE 7/8 when header value is empty or is empty space

Reported by: jonhoffman1@… Owned by: jonhoffman1@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

when using the .ajax() function, you cannot set a custom header to a blank value if the target browser is IE 7/8. For example:

$.ajax({

headers: { SOAPAction: ' '}, ...

});

results in no header being set in IE. The header is set correctly in Chrome.

If you try to use the xhr.setRequestHeader() function in the "beforeSend" option of .ajax(), the result is the same.

In any case, if you enter any non-empty value, then the header is set in IE correctly.

Change History (5)

comment:1 Changed 11 years ago by dmethvin

Owner: set to jonhoffman1@…
Status: newpending

A complete test case would be helpful. The snippet you've posted isn't enough to do any debugging, it's not clear whether this is a POST or GET for example. You might check #7424 and see if that helps.

comment:2 in reply to:  1 ; Changed 11 years ago by jonhoffman1@…

Status: pendingnew

Replying to dmethvin:

A complete test case would be helpful. The snippet you've posted isn't enough to do any debugging, it's not clear whether this is a POST or GET for example. You might check #7424 and see if that helps.

#7424 is similar but in my case, all that determines whether it works or not is if the header is set to a non-empty vs. empty value.

Here is a better test case (I am using .ajax() to consume a web service):

$.ajax({

headers: {

SOAPAction: 'getTransactionCount'

},

type: 'POST', url: serviceEndpointURL, data: soapXmlString, success: function(msg) { alert('Message: '+msg);}, error: function(){ alert('error!');}

});

You'd have to fill in serviceEndpointURL and soapXmlString with working values for a webservice to test this, but the issue isn't with the soap/webservice stuff it's with the HTTP header not getting set in IE.

Instead of using the headers:{} option, I've also tried using this: beforeSend : function(xhr) {

xhr.setRequestHeader("header", " ");

}

comment:3 in reply to:  2 Changed 11 years ago by jaubourg

Status: newassigned

You'd have to fill in serviceEndpointURL and soapXmlString with working values for a webservice to test this, but the issue isn't with the soap/webservice stuff it's with the HTTP header not getting set in IE.

That's the gist of the problem: we don't have enough time to do that, hence why we ask for a *reduced* test case. We cannot pass an entire hour handling a single non-verifiable bug report.

You ticket is number #12514: imagine if we had to do the kind of work you're asking us to do for the previous 12513 reports. Say it would take an hour per ticket: in the end it's about 5 years of work, just checking bugs, counting holidays.

There are millions of things that can go wrong server-side and client-side here. I'm not saying there is no bug but, please, help us help you. We just cannot go on a wild-goose chase with every single bug report.

comment:4 Changed 11 years ago by dmethvin

Status: assignedpending

comment:5 Changed 11 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.