HTTPS-запрос на поддоменах github.com возвращает неправильные 301 перенаправления на домен

.

Первый

При выполнении curl -iv4 https://support.github.com/contactя получаю 301 ответ с местоположением https://github.com/contact.

Очевидно, что при выполнении curl для местоположения, возвращенного из ответа 301, я получаю только ответ 404.

Некоторые из моих машин (linux hosts или docker-контейнеры )никогда не затрагивались, некоторые — нет. По какой-то причине он кажется привязанным к моей сети.

Я обнаружил проблему при попытке доступа к поддомену api.github.com, проблема та же самая.

Я отправил заявку в службу поддержки GitHub, но на данный момент ответа нет.

Та же проблема в веб-браузерах, поэтому она вообще не связана с завитком.

Итак, если у кого-то есть какие-либо идеи о том, что может заставить сервер ошибочно возвращать ответ 301 на https, я открыт для любых предложений

РЕДАКТИРОВАТЬ:

Ошибка запроса

fail-host:~$ curl -iv4 https://support.github.com/contact
*   Trying 140.82.121.3...
* TCP_NODELAY set
* Connected to support.github.com (140.82.121.3) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.com
*  start date: Mar 25 00:00:00 2021 GMT
*  expire date: Mar 30 23:59:59 2022 GMT
*  subjectAltName: host "support.github.com" matched cert's "*.github.com"
*  issuer: C=US; O=DigiCert, Inc.; CN=DigiCert High Assurance TLS Hybrid ECC SHA256 2020 CA1
*  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
* Using Stream ID: 1 (easy handle 0x5579f6dcac10)
> GET /contact HTTP/2
> Host: support.github.com
> User-Agent: curl/7.64.0
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 301
HTTP/2 301
< content-length: 0
content-length: 0
< location: https://github.com/contact
location: https://github.com/contact

<
* Connection #0 to host support.github.com left intact

Успешный запрос:

fail-host:~$ curl -iv4 https://support.github.com/contact
*   Trying 140.82.121.3...
* TCP_NODELAY set
* Connected to support.github.com (140.82.121.3) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.com
*  start date: Mar 25 00:00:00 2021 GMT
*  expire date: Mar 30 23:59:59 2022 GMT
*  subjectAltName: host "support.github.com" matched cert's "*.github.com"
*  issuer: C=US; O=DigiCert, Inc.; CN=DigiCert High Assurance TLS Hybrid ECC SHA256 2020 CA1
*  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
* Using Stream ID: 1 (easy handle 0x5579f6dcac10)
> GET /contact HTTP/2
> Host: support.github.com
> User-Agent: curl/7.64.0
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 301
HTTP/2 301
< content-length: 0
content-length: 0
< location: https://github.com/contact
location: https://github.com/contact

<
* Connection #0 to host support.github.com left intact

РЕДАКТИРОВАТЬ :Фикс.

Проблема находится на стороне github.com, см.:

Приводит к неправильному перенаправлению 301 :curl -v https://support.github.com/contact --resolve 'support.github.com:443:140.82.121.3'

Приводит к правильному перенаправлению 302 :curl -v https://support.github.com/contact --resolve 'support.github.com:443:140.82.114.21'

Пока что github не ответил на мой личный запрос в службу поддержки.

0
задан 8 November 2021 в 17:48
1 ответ

Проблема на стороне github.com, см.:

Приведет к неправильному перенаправлению 301:curl -vhttps://support.github.com/contact--разрешить 'support.github.com:443:140.82.121.3'

приведет к правильному перенаправлению 302:curl -vhttps://support.github.com/contact--разрешить ' support.github.com:443:140.82.114.21'

Пока github не ответил на мой личный запрос в службу поддержки.

0
ответ дан 15 November 2021 в 11:15

Теги

Похожие вопросы