ASP.NET web service does not work in Safari - safari

I have a WebForms page (.aspx) that accepts parameters via get / post and returns XML. This works in all browsers except for Safari where I get this gem:
Safari can’t open the page [URL]. The error was: “unknown error”
(CFURLErrorDomain:303) Please choose Report Bugs to Apple from the Help menu,
note the error number, and describe what you did before you saw this message.
Anyone see this before or know what it means?
UPDATE:
The web service is working for the http:// protocol, but fails under https://

Thank you, this did the trick for us.
context.Response.AddHeader("Content-Length", FilInfo.Length.ToString())
http://bit.ly/RTSnr4

I had the same problem. Worked via HTTP, didn't via HTTPS. Adding the Content-Length header fixed it for me:
Context.Response.AddHeader("Content-Length", result.Length)
Context.Response.Write(result)

Is it really Safari or is it Webkit? That is have you tried it with Chrome and/or Konquerer? It's possible that may give you an additional clue.

Related

Google oauth is responding with redirect_uri_mismatch error

My site is already live, example - https://www.example.io (with https)
I always get back this error
For some reason it is using HTTP although in the credentials i use https.
Btw this google API is already in production.
I'm not sure how to debug this. i tried http://localhost:3000 and it works perfectly for local development.
I'm using https://github.com/jaredhanson/passport-google-oauth with node.js
It works after i added a slash at the end
https://example.com/auth/google/callback
to
https://example.com/auth/google/callback/
I'm not sure though, but hope that this will help other people

Mikrotic SSL Https Error

I'm trying to build an hotspot with mikrotik to allow the internet to my clients! So, the problem starts when i'm trying to access sites with Https sercurity like facebook, before the user authenticates.
With normal http connection the hotspot works fine, but when i put https, i'm getting this error: error
Can someone please help me? I have read all the docs in the mikrotik forum, nothing worked!
it's good news that nothing worked because it's the purpose of HTTPS: ensure that the site you want is the site you get. Hotspot does exactly the reverse: you ask for a website and you get another one (hotspot landing page): error.
There is no workaround without installing your certificate on each client, which is not doable on a hotspot environment.
Hopefully, problem has been handled with CNAs (Captive Network Assistants) which detect hotspot presence and launch an automatic HTTP request before the user has time to launch its own browser and navigate to Facebook. Latest iOS/Android/Windows versions do that automatically.

How to resolve cross-domain issue with PDF.js?

I am facing issue while making a cross-domain request to fetch PDF files through PDF.js. Can anybody give me a steps for enabling cross-domain request on Apache server for PDF.js?
Try queryString method of viewer.html; e.g www.example.com/pdf.js/web/viewer.html?file=yourFileURI
Example Link
NOTE: if clicking it doesn't work, try copy/pasting this into browser address bar: http://mozilla.github.io/pdf.js/web/viewer.html?file=http%3A%2F%2Fasync5.org%2Fmoz%2Fpdfjs.pdf
Ref: A great reference on using viewer.html queryString parameters.
A great guide to setup pdf.js can be found here.
Hope this helps.

google weather api links need human authentication

I developed a weather app using google weather API
but from today it stopped working.
When I tried to access the weather API using location through browser it asks for human authentication.
How can my app work when it is like this? Is there a way to bypass the authentication process?
It's very odd behavior...I wonder if it has something to do with headers that are passed along as when I try loading the API url in Chrome, Unsupported API...or if I do same URL in Firefox, works just fine.
It's also worth noting that I tried setting up an Apache Proxy to Google's weather service by placing the following two lines in a separate Web Server's apache config and referenced the API via www.domain.com/weather/api?weather=Chicago and it still works...so that's my workaround for now:
ProxyPassReverse /weather/ http://www.google.com/ig/
ProxyPass /weather/ http://www.google.com/ig/
Try to change domain, ex: http://www.google.ca/ig/api?weather=Sondrio . It works (for now :D).
Looks like it is out of use from now on
Even using .CA it returns Unsupported API randomly.
Pity
Yeah, interesting, Google seems to send back random "Unsupported API" responses if the request is missing the cookies that the browsers (tested with Chrome and Firefox) are including with requests to the inofficial weather URL.
I've fixed my application by copying the entire "Cookie:" header I found when I ran the request in Firefox with Firebug's "Net" tab enabled.
Not sure where on .google.com the browser got the cookies from yet, I presume from using a personalized service like gmail.
if you are looking for a weather API that works right now, I have a suggestion…
Try Metwit Weather API, it's new but sounds very cool…
This api is really simple to use because it use standards that are available nowadays, like JSON and REST.
you can use this new api this has the same xml structure of google weather api
http://en.previmeteo.com/professionals/google-weather-api.php

http://dev.twitter.com/ redirects to http://twitter.com/

I am trying to access my Twitter API but the call is failing due to the redirect. Does anybody know why this is happening and or how I can fix it? Yes, I am signed in.
Are you using the "Use HTTPS" on Chrome, or a similar extension?
For me, it redirects http://dev.twitter.com to https://dev.twitter.com, which in turn redirects to https://twitter.com
Ideally, the extension would offer more control in how it matches domains. Meanwhile, a quick workaround is to open an incognito window, for which extensions are disabled, and view dev.twitter.com there.