Refused to set unsafe header Content-length refuse to set unsafe header Connection

Oct 02, 2008 12:32 PM|mthakershi|LINK

errors in FF 3.0.3 and also Google Chrome through IIS server. This happens once I try to entrust Content-length and Connection nature to XmlHttpRequest object. You re welcome help.

You are watching: Refused to set unsafe header content length

jsXmlHttp = jsFnReturnXmlHttp(); if(jsXmlHttp != null) jsXmlHttp.open("POST", pStrURL, false); //Send the suitable header information in addition to the request jsXmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); jsXmlHttp.setRequestHeader("Content-length", pStrParams.length); jsXmlHttp.setRequestHeader("Connection", "close"); jsXmlHttp.onreadystatechange=jsFnOnUpdateGraphContentDatesChangedSessionSet; jsXmlHttp.send(pStrParams);
xmlhttprequest


*
NC01

All-Star


40630 Points

15348 Posts


Re: refuse to collection unsafe header Content-length refuse to set unsafe header Connection

Oct 02, 2008 02:22 PM|NC01|LINK
What"s the error and why are you making use of "POST" anyways?

NC...


*
mthakershi

Member


217 Points

243 Posts


Re: refused to collection unsafe header Content-length refuse to collection unsafe header Connection

Oct 02, 2008 02:39 PM|mthakershi|LINK
When I run application in FF/Chrome, internet browser JS console says:

Refused to set unsafe header Content-length

Refused to collection unsafe header link

And climate it won"t fire the "send" call.

I am using short article because I want to sent quite a little bit of data to the receiving page. I pass it as parameters. Is that a problem?

Thank friend for your help.


*
NC01

All-Star


40630 Points

15348 Posts


Re: refused to set unsafe header Content-length refused to set unsafe header Connection

Oct 03, 2008 08:58 AM|NC01|LINK

mthakershiWhen I run application in FF/Chrome, internet browser JS console says:

Refused to set unsafe header Content-length

Refused to collection unsafe header connection

And then it won"t fire the "send" call.

See these links for some help on the (maybe!).http://developer.mozilla.org/en/XMLHttpRequest_changes_for_Gecko1.8http://www.google.com/search?hl=en&q=setRequestHeader%28%22Content-length%22+AND+Firefox&btnG=Google+Search&aq=f&oq=

mthakershiI am using write-up because I want to sent quite a little of data come the receiving page. Ns pass it together parameters. Is that a problem?

No it is just unusual to use write-up in AJAX solutions. I"ve never really excellent that. Wouldn"t utilizing a QueryString do just as well?

NC...


*
mthakershi

Member


217 Points

243 Posts


Re: refuse to collection unsafe header Content-length refuse to set unsafe header Connection

Oct 03, 2008 12:25 PM|mthakershi|LINK
At one allude my query string size increased much more than allowed. So i switched come this solution. However that happens just in one instance in my project. So i will readjust it to utilizing query string.

Thank you.


*
NC01

All-Star


40630 Points

15348 Posts


Re: refuse to set unsafe header Content-length refuse to set unsafe header Connection

Oct 03, 2008 02:04 PM|NC01|LINK
I review in among those web links that i postedthat the size passed using post is restricted to 1024 characters which I think is the QueryString limit also.

NC...

See more: Will A Iphone 5S Case Fit A 5C ? Will A Protective Case For An Iphone 5C F…


‹ previous Thread|Next subject ›

This website is controlled for Microsoft through Neudesic, LLC. | ©2021Microsoft. All legal rights reserved.