Page MenuHomePhabricator
Paste P11230

T253114 - example of a request that works (via Chrome's "Copy as cURL" option)
ActivePublic

Authored by Tgr on May 19 2020, 10:32 AM.
Tags
None
Referenced Files
F31832799: raw.txt
May 19 2020, 10:32 AM
Subscribers
None
curl -v 'https://hu.wikipedia.org/w/api.php?action=opensearch&format=json&formatversion=2&search=R%C3%A9vai%20Le&namespace=&limit=10' \
-H 'authority: hu.wikipedia.org' \
-H 'pragma: no-cache' \
-H 'cache-control: no-cache' \
-H 'accept: application/json, text/javascript, */*; q=0.01' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36' \
-H 'x-requested-with: XMLHttpRequest' \
-H 'sec-fetch-site: same-origin' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
-H 'referer: https://hu.wikipedia.org/wiki/Speci%C3%A1lis:Be%C3%A1ll%C3%ADt%C3%A1saim' \
-H 'accept-language: hu-HU,hu;q=0.9,en-US;q=0.8,en;q=0.7,de;q=0.6' \
-H 'cookie: thanks-thanked=21572598%252C21642211%252C21647732%252C21663766%252C21888484%252C22007193%252C22244880%252C22248534; GeoIP=HU:GS:Sopron:47.67:16.59:v4; huwikiUserName=Tgr; huwikiUserID=445; forceHTTPS=true; centralauth_User=Tgr; centralauth_Token=<redacted>; huwikimwuser-sessionId=<redacted>; stopMobileRedirect=true; loginnotify_prevlogins=<redacted>; VEE=wikitext; WMF-Last-Access-Global=19-May-2020; WMF-Last-Access=19-May-2020; huwikiSession=<redacted>; centralauth_Session=<redacted>' \
--compressed
* Trying 2620:0:862:ed1a::1...
* TCP_NODELAY set
* Connected to hu.wikipedia.org (2620:0:862:ed1a::1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Unknown (8):
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Client hello (1):
* TLSv1.3 (OUT), TLS Unknown, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Wikimedia Foundation, Inc.; CN=*.wikipedia.org
* start date: Nov 12 00:00:00 2019 GMT
* expire date: Oct 6 12:00:00 2020 GMT
* subjectAltName: host "hu.wikipedia.org" matched cert's "*.wikipedia.org"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.3 (OUT), TLS Unknown, Unknown (23):
* TLSv1.3 (OUT), TLS Unknown, Unknown (23):
* TLSv1.3 (OUT), TLS Unknown, Unknown (23):
* Using Stream ID: 1 (easy handle 0x55a3cfcd2580)
* TLSv1.3 (OUT), TLS Unknown, Unknown (23):
> GET /w/api.php?action=opensearch&format=json&formatversion=2&search=R%C3%A9vai%20Le&namespace=&limit=10 HTTP/2
> Host: hu.wikipedia.org
> Accept-Encoding: deflate, gzip
> authority: hu.wikipedia.org
> pragma: no-cache
> cache-control: no-cache
> accept: application/json, text/javascript, */*; q=0.01
> user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
> x-requested-with: XMLHttpRequest
> sec-fetch-site: same-origin
> sec-fetch-mode: cors
> sec-fetch-dest: empty
> referer: https://hu.wikipedia.org/wiki/Speci%C3%A1lis:Be%C3%A1ll%C3%ADt%C3%A1saim
> accept-language: hu-HU,hu;q=0.9,en-US;q=0.8,en;q=0.7,de;q=0.6
> cookie: <redacted>
>
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS Unknown, Unknown (23):
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
* TLSv1.3 (OUT), TLS Unknown, Unknown (23):
* TLSv1.3 (IN), TLS Unknown, Unknown (23):
< HTTP/2 200
< date: Tue, 19 May 2020 10:20:58 GMT
< server: mw1356.eqiad.wmnet
< x-content-type-options: nosniff
< x-search-id: 4i1wne9lcv53t3nodpgtswbcy
< x-opensearch-type: prefix
< x-frame-options: DENY
< content-disposition: inline; filename=api-result.json
< vary: Accept-Encoding,Treat-as-Untrusted,X-Forwarded-Proto,Cookie,Authorization
< cache-control: private, must-revalidate, max-age=10800
< content-type: application/json; charset=utf-8
< content-encoding: gzip
< age: 0
< x-cache: cp3054 miss, cp3064 pass
< x-cache-status: pass
< server-timing: cache;desc="pass"
< strict-transport-security: max-age=106384710; includeSubDomains; preload
< x-client-ip: 2a02:ab88:56c3:c880:c564:f7e5:be47:f091
< accept-ranges: bytes
< content-length: 90
<
* Connection #0 to host hu.wikipedia.org left intact
["Révai Le",["Révai Leó"],[""],["https://hu.wikipedia.org/wiki/R%C3%A9vai_Le%C3%B3"]]