Using WMS I do a GetCapabilities request on a GeoServer instance. This works in FireFox, but not in Chrome, Safari, and Internet Explorer.  The point is that in the web.xml from the server I did add:  "Access-Control-Allow-Origin: *"   So the XML output does not have anything which will put the Access-Control-Allow-Origin header in.  And the case is that in any other request this not an issue, especially when I use jsonp in the jquery AJAX call.  However I didn't find any way to get the Capabilities in a JSON object.  In other words I am stuck with XML and this doesn't seem to work.   Is there a way to do the request on jsonp? If not how do I set-up the server so that the GetCapabilities XML does use the Access-Control-Allow-Origin?
5874
I hope somebody has already figured this one out. I just installed Geoserver 2.9 on a vanilla Ubuntu 16.04 distro. The Geoserver 2.8 method of enabling CORS with the shanbe.hezoun class does no longer work with Jetty 9.2.13.  There are mentions that CORS support is already packaged with Jetty 9.2.13 in the jetty-servlets.jar.  The Jetty lib which is compiled with Geoserver contains a jetty-servlet-9.2.13.v20150730.jar in geoserver/lib but not jetty-servlets.9.2.13.v20150730.jar. Are these supposed to be the same jar with a different name?  It should be possible to enable CORS either in geoserver/etc/webdefault.xml or in geoserver/webapps/geoserver/WEB-INF/web.xml.  My understanding is that the webdefault.xml is applied first and the web.xml thereafter.  I have tried following filter in both xml. I haven't got as far as adding a filter mapping. Adding the filter alone will cause the Geoserver/Jetty service to not start proper.  &lt;filter&gt;     &lt;filter-name&gt;cross-origin&lt;/filter-name&gt;     &lt;filter-class&gt;org.eclipse.jetty.servlets.CrossOriginFilter&lt;/filter-class&gt; &lt;/filter&gt;
20853
Is there a way to perform an HTTP GET request within a Visual Basic script?  I need to get the contents of the response from a particular URL for processing.
57784
I'm working on a offline version of a website using jQuery and some xml files. I'm running in to a problem in jQuery when I do a $.ajax call on a xml file jQuery throws a error.  When I look at the error I can tell its loading the XML file because its in the error's responceText property. It seams to work just fine in Firefox.  This is how my call looks  $.ajax({     type: "GET",     url: "Modules/" + ModuleID + "/ModuleContent.xml",     dataType: "xml",     success: function(x) { xml = x; ProcessXML(); },     error: function(x) { alert(x.responceText); } });   When I run this on a web server it works just fine. Its only when I run it from the file its self when I have this problem.  Any ideas on how I can make this work in IE?  Edit: I found the answer to my problem.
35973
Im trying to access a web service from a remote computer. I managed to access the web service from the browser. But Im getting HTTP 403 when I try to call the web service from the application.  Any idea why?
51615
I developed a chrome extension which extract some data from the user visiting page and I want to transmit them to my database by an AJAX call (my website is a basic wordpress website).  The point is that the ajax response is error 400 and I do not understand where is the problem as I tried to modify my ajax request the best I could.  Here is my AJAX request from content.js  /* Popup clicked */  $('#myOwnCustomToolBar_TT91 #message_to_click form.groupio_form #subscribe').on('click', function(){      chrome.runtime.sendMessage(product_infos);   });    Here is the new background.js file :    chrome.runtime.onMessage.addListener(function(response, sender, sendResponse){          jQuery.ajax({          type:"POST",         url: "https://www.groupio.fr/wp-admin/admin-ajax.php",         contentType: 'json',         dataType: "JSON",         responseType:'json',          data: {             action : "itempricingfunction",             ean : "EANTEST0101010"         },          success:function(data){              alert(data);          },          error: function(errorThrown){             console.log(errorThrown);         }         });  });    Here is my function called itempricingfunction inside the functions.php file of my wordpress theme file  function itempricingfunction(){   $product_ean = (isset($_POST['ean'])) ? htmlentities($_POST['ean']) : NULL; echo json_encode(array('product_ean' =&gt;$product_ean));       exit; }  add_action("wp_ajax_nopriv_itempricingfunction", "itempricingfunction"); add_action("wp_ajax_itempricingfunction", "itempricingfunction");    And finally, when I go to the product page and click on the chrome extension, the response of the ajax call is Error 400.  Thank you very much for your help !
121562
Is it possible to request the bounding box of a WMS from GeoServer?  In my case I have a WMS that I show with L.TileLayer.WMS in a Leaflet map. I like to center and zoom my map to the WMS.
90139
I need to display external resources loaded via cross domain requests and make sure to only display "safe" content.   Could use Prototype's  to remove script blocks. But handlers such as onclick or onerror are still there.  Is there any library which can at least   strip script blocks, kill DOM handlers, remove black listed tags (eg: embed or object).   So are any JavaScript related links and examples out there?
84944
Currently I am using a QGIS server with a Linux CentOS system. I am attempting the create a WMS in QGIS and upload it to my website. I have followed the instructions in the "Quantum GIS User Guide: version 1.7.0 Wroclaw". I am trying to call the newly created WMS in QGIS by "Add Layer(s) from a server" button. I am very certain I am entering the correct address but I always get this error below    Could not understand the response. The wms provider said: Download of capabilities failed: Error downloading  http://***************/cgi-bin/projects/qgismapserv.fcgi?SERVICE=WMS&REQUEST=GetCapabilities Server replied Internal Server Error
13754
I'm looking into a restful design and would like to use the HTTP methods (POST, GET, ...) and HTTP headers as much as possible. I already found out that the HTTP methods PUT and DELETE are not supported from the browser.  Now I'm looking to get different representations of the same resource and would like to do this by changing the Accept header of the request. Depending on this Accept header, the server can serve a different view on the same resource.  Problem is that I didn't find a way to tell my browser to change this header.   The &lt;a..&gt; tag has a , that can have a mime type, looked like a good candidate but the header was still the browser default (in Firefox it can be changed in about:config with the network.http.accept.default key).
108761
We are using SharePoint Online. I am planning to add a flow to send out an email notification whenever a new page is added to the site.   To do that, I need the list of members of that site cause I don't want to send it to everyone or anyone.   I am unable to retrieve the group members through REST API. When I fire the following REST call, I am getting the response as follows, but not the actual members and their email addresses  https://dhdigitalcoin.sharepoint.com/sites/OpenSourceTechTalk/_api/web/sitegroups/getbyname('Open%20Source%20Tech%20Talk%20Members')/users   &lt;entry&gt; &lt;id&gt;https://dhdigitalcoin.sharepoint.com/sites/OpenSourceTechTalk/_api/Web/GetUserById(7)&lt;/id&gt; &lt;category term="SP.User" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/&gt; &lt;link rel="edit" href="Web/GetUserById(7)"/&gt; &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Alerts" type="application/atom+xml;type=feed" title="Alerts" href="Web/GetUserById(7)/Alerts"/&gt; &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Groups" type="application/atom+xml;type=feed" title="Groups" href="Web/GetUserById(7)/Groups"/&gt; &lt;title/&gt; &lt;updated&gt;2019-06-03T12:47:56Z&lt;/updated&gt; &lt;author&gt; &lt;name/&gt; &lt;/author&gt; &lt;content type="application/xml"&gt; &lt;m:properties&gt; &lt;d:Id m:type="Edm.Int32"&gt;7&lt;/d:Id&gt; &lt;d:IsHiddenInUI m:type="Edm.Boolean"&gt;false&lt;/d:IsHiddenInUI&gt; &lt;d:LoginName&gt;c:0o.c|federateddirectoryclaimprovider|92b9f118-885e-4c23-a103-de7ce46d7421&lt;/d:LoginName&gt; &lt;d:Title&gt;Open Source Tech Talk Members&lt;/d:Title&gt; &lt;d:PrincipalType m:type="Edm.Int32"&gt;4&lt;/d:PrincipalType&gt; &lt;d:Email&gt;OpenSourceTechTalk@xxx.onmicrosoft.com&lt;/d:Email&gt; &lt;d:Expiration/&gt; &lt;d:IsEmailAuthenticationGuestUser m:type="Edm.Boolean"&gt;false&lt;/d:IsEmailAuthenticationGuestUser&gt; &lt;d:IsShareByEmailGuestUser m:type="Edm.Boolean"&gt;false&lt;/d:IsShareByEmailGuestUser&gt; &lt;d:IsSiteAdmin m:type="Edm.Boolean"&gt;false&lt;/d:IsSiteAdmin&gt; &lt;d:UserId m:null="true"/&gt; &lt;d:UserPrincipalName m:null="true"/&gt; &lt;/m:properties&gt; &lt;/content&gt; &lt;/entry&gt;   Is there a way I can retrieve the actual members?  Am I taking the right approach towards building email notifications?
26888
I've seen a couple questions around here like , which mentions:     Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even HTTP POST.   I've also heard that browsers support only GET and POST, from some other sources like:        However, a few quick tests in Firefox show that sending PUT and DELETE requests works as expected -- the XMLHttpRequest completes successfully, and the request shows up in the server logs with the right method. Is there some aspect to this I'm missing, such as cross-browser compatibility or non-obvious limitations?
45541
When you have a dedicated Visualforce Page and can use modern JavaScript Remoting techniques, this is seldom an issue. But I'm looking at some historical code in a managed package like this:  {!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}  var result = sforce.apex.execute(     "ns.WebServiceClass",     "someWebServiceMethod",     {"arg1": "foo", "arg2": "bar"} );  alert(result);   The ns is baked in. While this JavaScript can be deployed to another development org, the web service invocation will not execute as the class doesn't have a namespace prefix in this environment.  Same problem applies to Custom Button or Link URLs. Surely URLFOR('/apex/PageName') would resolve the namespace prefix; after all the button is a managed component with the namespace on it. But it doesn't work the same magic that new PageReference('/apex/PageName') does in Apex.  I've seen a few approaches including (but not limited to):   maintaining a list of manual deployment steps, using some precompile task (eg Ant) to tokenize the namespace prefix,   Can you gurus share any other techniques?
3184
I am running a GetFeature request against a WFS server which does not support to download all data at once. Can I use ogc:PropertyIsGreaterThanOrEqualTo to split the dataset into chunks at download them step by step? I wonder how I can construct the actual URL to include the paging filter. Here is what I tried:  http://example.com/wfs.aspx?request=GetFeature&amp;service=WFS&amp;version=1.1.0 \ &amp;typeName=example:example&amp;maxFeatures=50000 \ &amp;FILTER=&lt;ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"&gt; \ &lt;ogc:PropertyIsGreaterThanOrEqualTo&gt;&lt;ogc:PropertyName&gt;OBJECTID&lt;/ogc:PropertyName&gt; \ &lt;ogc:Literal&gt;50000&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsGreaterThanOrEqualTo&gt;&lt;/ogc:Filter&gt;   This is not a valid URI though... That's why uri-encoded the filter part:  http://example.com/wfs.aspx?request=GetFeature&amp;service=WFS&amp;version=1.1.0 \ &amp;typeName=example:example&amp;maxFeatures=50000 \     &amp;FILTER=%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net \ %2Fogc%22%3E%3Cogc%3APropertyIsGreaterThanOrEqualTo%3E%3Cogc%3APropertyName%3EOBJECTID \ %3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E50000%3C%2Fogc%3ALiteral \ %3E%3C%2Fogc%3APropertyIsGreaterThanOrEqualTo%3E%3C%2Fogc%3AFilter%3E   This actually works. Is there a "nicer" way to do this?
93583
I'm trying to use jQuery to get data from an ASP.NET web service (SharePoint Server 2007 lists.asmx), but any call to a web service will really help as a first step in that direction.
7743
I have developed an application in C# that makes use of the Salesforce API via a WSDL and need to ensure that the upcoming disabling of SSL3.0 will not affect functionality. I have never had to do any specification of the security protocol when using the webservice, so I am not sure what to do.  How do I:   Determine what protocol is currently being used in my implementation. Set it to use TLS (if necessary)
56790
JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site?   Edit: Microsoft created a way to prevent XSS attacks by disallowing JavaScript access to cookies if HttpOnly is specified. FireFox later adopted this. So my question is: If you are using AJAX on a site, like StackOverflow, are Http-Only cookies an option?  Edit 2: Question 2. If the purpose of HttpOnly is to prevent JavaScript access to cookies, and you can still retrieve the cookies via JavaScript through the XmlHttpRequest Object, what is the point of HttpOnly?  Edit 3: Here is a quote from Wikipedia:     When the browser receives such a cookie, it is supposed to use it as usual in the following HTTP exchanges, but not to make it visible to client-side scripts.[32] The HttpOnly flag is not part of any standard, and is not implemented in all browsers. Note that there is currently no prevention of reading or writing the session cookie via a XMLHTTPRequest. [33].   I understand that document.cookie is blocked when you use HttpOnly. But it seems that you can still read cookie values in the XMLHttpRequest object, allowing for XSS. How does HttpOnly make you any safer than? By making cookies essentially read only?   In your example, I cannot write to your document.cookie, but I can still steal your cookie and post it to my domain using the XMLHttpRequest object.  &lt;script type="text/javascript"&gt;     var req = null;     try { req = new XMLHttpRequest(); } catch(e) {}     if (!req) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}     if (!req) try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}     req.open('GET', 'http://stackoverflow.com/', false);     req.send(null);     alert(req.getAllResponseHeaders()); &lt;/script&gt;   Edit 4: Sorry, I meant that you could send the XMLHttpRequest to the StackOverflow domain, and then save the result of getAllResponseHeaders() to a string, regex out the cookie, and then post that to an external domain. It appears that Wikipedia and ha.ckers concur with me on this one, but I would love be re-educated...  Final Edit: Ahh, apparently both sites are wrong, this is actually a . IE6 &amp; 7 are actually the only browsers that currently fully support HttpOnly.  To reiterate everything I've learned:   HttpOnly restricts all access to document.cookie in IE7 &amp; and FireFox (not sure about other browsers) HttpOnly removes cookie information from the response headers in XMLHttpObject.getAllResponseHeaders() in IE7. XMLHttpObjects may only be submitted to the domain they originated from, so there is no cross-domain posting of the cookies.   edit: This information is likely no longer up to date.
75262
When I get a captcha on Stack Overflow, I don't see the image or the input box with Firefox. I originally had the "HTTPS Anywhere" extension installed but still have the same issue when it's disabled (This caused issues previously when Google's SSL certs were expired for an old domain IIRC).  The requests to Google seem to be never-ending; browsing to the URLs that are still loading results in some pages of JavaScript, but no errors as you'd hope.  The screenshot was taken after the page had been open for more than 3 minutes, and I'm not sure why the GETs are still running. The request popup visible in Firebug is for "GET challenge?k=...."  When browsing to the same captcha page in IE, there are no issues.  I'm aware this could be an issue with my Firefox configuration, as opposed to the site, but would appreciate it if someone could verify if it's just me, and suggest a fix.  EDIT   While visiting the Recaptcha site, I can see a Captcha with no problems If I right-click the problem URLs in FF and Open in new tab, the pages load fine. From the fact that FB omits IP Addresses for the problem ones, I assume that it's not even opening a connection (nor perhaps performing a DNS lookup) Other sites that use Recaptcha seem to work fine (I picked 3 at random from Google)