Last modified: 2012-12-01 16:52:22 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 T44129, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42129 - HTTPS Connection Close for login via API for Commons Wiki with IE user agent
HTTPS Connection Close for login via API for Commons Wiki with IE user agent
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Lowest minor (vote)
: ---
Assigned To: Nobody - You can work on this!
aklapper-moreinfo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-15 01:36 UTC by Smallman
Modified: 2012-12-01 16:52 UTC (History)
5 users (show)

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


Attachments

Description Smallman 2012-11-15 01:36:09 UTC
When logging in via the commons API https://commons.wikimedia.org/w/api.php with an IE user agent, the response says "Connection: close" even if "Connection: Keep-Alive" is set in the request. This behavior is not seen if the user-agent is set to Firefox.

Steps to replicate:
**IE user agent request**

POST https://commons.wikimedia.org/w/api.php HTTP/1.1
Accept: */*
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Host: commons.wikimedia.org
Content-Length: 51
Connection: Keep-Alive
Cache-Control: no-cache

format=xml&action=login&lgname=user&lgpassword=pass

**IE user agent response**
HTTP/1.1 200 OK
Server: nginx/0.7.65
Date: Thu, 15 Nov 2012 01:10:11 GMT
Content-Type: text/xml; charset=utf-8
Connection: close
X-Content-Type-Options: nosniff
Cache-Control: private
Set-Cookie: commonswiki_session=<removed>; path=/; secure; HttpOnly
X-Frame-Options: SAMEORIGIN
Vary: Accept-Encoding
Content-Length: 173
X-Cache: MISS from cp1003.eqiad.wmnet
X-Cache-Lookup: MISS from cp1003.eqiad.wmnet:3128
X-Cache: MISS from cp1011.eqiad.wmnet
X-Cache-Lookup: MISS from cp1011.eqiad.wmnet:80

<?xml version="1.0"?><api><login result="NeedToken" token="<removed>" cookieprefix="commonswiki" sessionid="<removed>" /></api>

--------------------------------------------------------------------

**Firefox user agent request**
POST https://commons.wikimedia.org/w/api.php HTTP/1.1
Accept: */*
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Host: commons.wikimedia.org
Content-Length: 51
Connection: Keep-Alive
Cache-Control: no-cache

format=xml&action=login&lgname=user&lgpassword=pass

**Firefox user agent response**
HTTP/1.1 200 OK
Server: nginx/0.7.65
Date: Thu, 15 Nov 2012 01:14:11 GMT
Content-Type: text/xml; charset=utf-8
Connection: keep-alive
X-Content-Type-Options: nosniff
Cache-Control: private
Set-Cookie: commonswiki_session=<removed>; path=/; secure; HttpOnly
X-Frame-Options: SAMEORIGIN
Vary: Accept-Encoding
Content-Length: 173
X-Cache: MISS from cp1003.eqiad.wmnet
X-Cache-Lookup: MISS from cp1003.eqiad.wmnet:3128
X-Cache: MISS from cp1010.eqiad.wmnet
X-Cache-Lookup: MISS from cp1010.eqiad.wmnet:80

<?xml version="1.0"?><api><login result="NeedToken" token="<removed>" cookieprefix="commonswiki" sessionid="<removed>" /></api>

Could this be related to:
http://blogs.msdn.com/b/ieinternals/archive/2011/03/26/https-and-connection-close-is-your-apache-modssl-server-configuration-set-to-slow.aspx
Comment 1 Sam Reed (reedy) 2012-11-15 01:39:17 UTC
Why are you using an IE user agent?
Comment 2 Brad Jorsch 2012-11-15 01:58:28 UTC
Unless you're using XMLHttpRequest out of the browser, do not use a browser's user agent. See https://meta.wikimedia.org/wiki/User-Agent_policy.

However, I tried manually sending the same request you list for your "IE user agent", and it gave me Connection: keep-alive.
Comment 3 Smallman 2012-12-01 16:52:22 UTC
It works...must've been some windows settings.

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


Navigation
Links