Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #10768

Re: HTTPS Relative XMLHttpRequest

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!feeder3.eweka.nl!81.171.88.16.MISMATCH!eweka.nl!hq-usenetpeers.eweka.nl!193.201.147.88.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.242.MISMATCH!nx01.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!ALLTEL.NET-a2kHrUvQQWlmc!not-for-mail
Date Sun, 29 Jan 2012 21:00:46 -0600
From MC <news@aisus.com>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0
MIME-Version 1.0
Newsgroups comp.lang.javascript
Subject Re: HTTPS Relative XMLHttpRequest
References <87d20$4f246a58$cf9b4ad3$21106@ALLTEL.NET> <1364299.WGnKmheAe9@PointedEars.de> <5JGdnZ4wwtMsernSnZ2dnUVZ7vSdnZ2d@giganews.com>
In-Reply-To <5JGdnZ4wwtMsernSnZ2dnUVZ7vSdnZ2d@giganews.com>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
Message-ID <d8997$4f26089a$32601a3a$3976@ALLTEL.NET> (permalink)
X-Complaints-To abuse@usenetserver.com
Organization UseNetServer.com
Lines 60
X-Trace d89974f26089a97c5bf9f03976
Xref x330-a1.tempe.blueboxinc.net comp.lang.javascript:10768

Show key headers only | View raw


On 1/29/2012 12:31 AM, Stefan Weiss wrote:
> On 2012-01-29 00:32, Thomas 'PointedEars' Lahn wrote:
>> MC wrote:
>>
>>> I have searched and found references by pointy-ears and Cornfed […]
>>
>> Please do not feed the troll (adjust your score-/killfile instead).
>
> A troll, you say? Would that be the person who asked a legitimate JS
> related question, or the one who tried to divert replies to
> alt.my.little.pony?
> I'm sure most readers of this group are able to make their own decisions
> about how to score posters. We generally don't feel the need to announce
> every filter adjustment in our postings, however.
>
> Back on topic...
> @OP: Yes, it is possible to use relative URLs in the XHR's open()
> method. The URL will be resolved relative to the base URL of the current
> document/window (see the XHR specification(s) for details).
> If the current URL uses the "https" scheme, you should be fine. If the
> scheme, domain, or port parts of the URL you want to request differ from
> the current base URL, you're going to run into problems with the
> browsers' same origin policy. But in that case, there's not much point
> in using relative URLs, anyway.
> There may be ways to relax this restriction, but I'd need to know more
> about your use case before I can recommend one. Please also describe
> what you have already tried and what did/didn't work for you.
>
>> F'up2 where it belongs
>
> Duly ignored.
>
>
> - stefan

Stefan,

I'm trying to clear up the browser mixed-mode error in the URL. The page 
is delivered via Https and all of the resources are relative addressed 
including the XmlHttpsRequest. The research I done seems to suggest I 
need to do an explicit Https XmlHttpsRequest to resolve the error.

This is what I'm using for my XmlHttpsRequest:
myXmlHttpRequest.open("POST", "/ws/webserviceXYZ.jsp");
myXmlHttpRequest.onreadystatechange = myResponse;
myXmlHttpRequest.send(myPostData);

I do not want to do the following as the domain is different in testing, 
production, and in affiliate modes:
myXmlHttpRequest.open("POST", 
"https://www.mydomain.com/ws/webserviceXYZ.jsp");

 From what you posted, the XmlHttpRequest should be defaulting to Https 
since the page was accessed from it. Chrome is complaining it is not 
though. Any help is greatly appreciated as I am not a troll. Pointy-ears 
just does not like it when one of the lesser JS smart people vocalize 
their disappointment in his depredations on their skills and character.

MC

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

HTTPS Relative XMLHttpRequest MC <news@aisus.com> - 2012-01-28 15:37 -0600
  Re: HTTPS Relative XMLHttpRequest Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-29 00:32 +0100
    Re: HTTPS Relative XMLHttpRequest Stefan Weiss <krewecherl@gmail.com> - 2012-01-29 07:31 +0100
      Re: HTTPS Relative XMLHttpRequest Tim Streater <timstreater@greenbee.net> - 2012-01-29 10:58 +0000
        Re: HTTPS Relative XMLHttpRequest MC <news@aisus.com> - 2012-01-29 21:02 -0600
      Re: HTTPS Relative XMLHttpRequest Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-29 14:57 +0100
      Re: HTTPS Relative XMLHttpRequest MC <news@aisus.com> - 2012-01-29 21:00 -0600
        Re: HTTPS Relative XMLHttpRequest Stefan Weiss <krewecherl@gmail.com> - 2012-02-01 13:34 +0100
          Re: HTTPS Relative XMLHttpRequest MC <news@aisus.com> - 2012-02-02 08:55 -0600
    Re: HTTPS Relative XMLHttpRequest MC <news@aisus.com> - 2012-01-30 08:01 -0600
      Re: HTTPS Relative XMLHttpRequest Scott Sauyet <scott.sauyet@gmail.com> - 2012-01-31 04:03 -0800

csiph-web