Last modified: 2012-04-16 09:15:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28834, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26834 - api.php over HTTPS (SSL) does not work
api.php over HTTPS (SSL) does not work
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-21 09:51 UTC by Paul
Modified: 2012-04-16 09:15 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Paul 2011-01-21 09:51:01 UTC
This is the api SSL link which shows the documentation: https://secure.wikimedia.org/wikipedia/en/w/api.php

But if I pass parameters like: https://secure.wikimedia.org/wikipedia/en/w/api.php?action=opensearch&format=json&search=abc it doesn't work anymore. Istead of showing the page with the results, the browser tries to download the api.php.  After downloading it, you can open it and the results are correctly in it.
I use the Firefox extension HTTPS-Everywhere from the EFF. So it would be great if the api.php would also work correctly via HTTPS.

Thanks!
Paul
Comment 1 Paul 2011-01-21 09:55:40 UTC
I'm sorry, I just tested in Chromium browser, and it works fine. So it must be firefox... Do you have any idea what could be wrong?
Comment 2 Antoine "hashar" Musso (WMF) 2011-01-21 10:08:54 UTC
same issue there with IE7 & Firefox 3.6.13
Comment 3 Sam Reed (reedy) 2011-01-21 10:09:53 UTC
What does format=jsonfm give?
Comment 4 Bryan Tong Minh 2011-01-21 10:19:27 UTC
I don't see why this is an issue. The same thing applies to HTTP connections. The fact that the browser does not open it, is caused by the content-type that we send along (something like application/json or whatever).
Comment 5 Daniel Friesen 2011-01-21 10:20:59 UTC
This is not a bug... the api is working the same in http and non-https.

You are explicitly requesting the json format, and hence the api sends a application/json content-type, most browsers don't have any special handling for json, so they prompt you to download the result as they do with other unknown filetypes. If you want a html preview of the json then use format=jsonfm.
Comment 6 Paul 2011-01-21 10:31:06 UTC
(In reply to comment #3)
> What does format=jsonfm give?

A normal HTML page loads. It says "You are looking at the HTML representation of the JSON format[...]" and below the JSON search results. I just tried format=xml, that works. I opened Firebug to check what Headers are send, but in case of format=json it shows nothing, maybe because firefox is directly trying to download the page.

(In reply to comment #4)
> I don't see why this is an issue. The same thing applies to HTTP connections.
> The fact that the browser does not open it, is caused by the content-type that
> we send along (something like application/json or whatever).

No, sorry, the problem is: In HTTP, the api works fine with the wikipedia searchplugin in firefox. if I change the url in the wikipedia searchplugin's xml file to the HTTPS url, it doesn't work anymore. And to check that I use the right URL, I just typed it into the browser directly. There I noticed, that in HTTP the browser just shows the json, in HTTPS tries to download it. Maybe it has nothing to do with my problem, but I thought there could be a link.
Comment 7 Bryan Tong Minh 2011-01-21 10:36:23 UTC
The same URL is used for the search box at the top of the page, which works in HTTPS.
Comment 8 Paul 2011-01-21 10:51:09 UTC
I just got it working. There's another big problem:
Without SSL I can type something into the searchbox and immediately get suggestions. With SSL I can type for example 'asd' and get nothing, even if I wait a long time. Now I can remove the 'd' and type it again, then I get the results. Ok, maybe an implementation issue, I will ask the firefox devs.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links