<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>49694</bug_id>
          
          <creation_ts>2024-03-14 12:34:51 +0300</creation_ts>
          <short_desc>Игнорировать reason-phrase по http</short_desc>
          <delta_ts>2024-03-15 19:21:26 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>apt</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrey Cherepanov">cas</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>boyarsh</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>242991</commentid>
    <comment_count>0</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2024-03-14 12:34:51 +0300</bug_when>
    <thetext>При настройке репозиториев на артифактори есть проблема с их подключением в Альте, а именно при выполнении команды:
sudo apt-get update
получаем ошибку:

E: Failed to fetch http://artifactory-ng.infowatch.ru:8081/artifactory/rpm-altlinux-p10-push_stream-test-local/x86_64/base/release  The http server sent an invalid reply header
E: Some index files failed to download. They have been ignored, or old ones used instead.

Проблема заключается в том, что артифактори отдаёт
&lt; HTTP/1.1 200
а apt-get ждёт
&lt; HTTP/1.1 200 OK
Проблема именно в &apos;OK&apos;(точнее в сообщении которого нет), вот код который это проверяет
https://git.altlinux.org/gears/a/apt.git?p=apt.git;a=blob;f=methods/http.cc;h=e285f167fb7fd8976853fb2a233ce412bbb3ddce;hb=39b08d81d1d8aef81e68a288fdcea9951808183c#l537
Может не учитывать Code, зачем он при определении версии HTTP?

клиент ДОЛЖЕН игнорировать reason-phrase
https://www.rfc-editor.org/rfc/rfc7230#section-3.1.2

The reason-phrase element exists for the sole purpose of providing a
textual description associated with the numeric status code, mostly
out of deference to earlier Internet application protocols that were
more frequently used with interactive text clients. A client SHOULD
ignore the reason-phrase content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>243046</commentid>
    <comment_count>1</comment_count>
    <who name="Gleb F-Malinovskiy">glebfm</who>
    <bug_when>2024-03-15 14:33:28 +0300</bug_when>
    <thetext>Чуть выше в этом же стандарте написано вот так:

The first line of a response message is the status-line, consisting
of the protocol version, a space (SP), the status code, another
space, a possibly empty textual phrase describing the status code,
and ending with CRLF.

Это значит пробел не опциональный, а опциональна только фраза после него.  Получается, apt соблюдает стандарт, а сервер *не* соблюдает.

Мне кажется, что вот такой способ и описание более правильные:
https://salsa.debian.org/apt-team/apt/-/commit/de2b1358926d293c85277e1d9a58ac94915470ec</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>243081</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2024-03-15 19:21:26 +0300</bug_when>
    <thetext>apt-0.5.15lorg2-alt87 -&gt; sisyphus:

 Fri Mar 15 2024 Andrey Cherepanov &lt;cas@altlinux&gt; 0.5.15lorg2-alt87
 - Ignore check reason-phrase element in HTTP header (ALT #49694).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>