Side navigation
#12514 closed bug (invalid)
Opened September 11, 2012 03:28PM UTC
Closed September 28, 2012 08:59AM UTC
.ajax() headers not set in IE 7/8 when header value is empty or is empty space
Reported by: | jonhoffman1@gmail.com | Owned by: | jonhoffman1@gmail.com |
---|---|---|---|
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.
Attachments (0)
Change History (5)
Changed September 11, 2012 04:36PM UTC by comment:1
owner: | → jonhoffman1@gmail.com |
---|---|
status: | new → pending |
Changed September 12, 2012 10:05PM UTC by comment:2
status: | pending → new |
---|
Replying to [comment:1 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", " ");
}
Changed September 13, 2012 11:06AM UTC by comment:3
status: | new → assigned |
---|
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.
Changed September 14, 2012 01:36AM UTC by comment:4
status: | assigned → pending |
---|
Changed September 28, 2012 08:59AM UTC by comment:5
resolution: | → invalid |
---|---|
status: | pending → closed |
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!
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.