You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@archiva.apache.org by "Kilian Felder (Jira)" <ji...@apache.org> on 2022/01/12 16:56:00 UTC

[jira] [Created] (MRM-2036) Rest API "wget .../searchService/artifact?..." -> http status 204 (no content)

Kilian Felder created MRM-2036:
----------------------------------

             Summary: Rest API "wget .../searchService/artifact?..." -> http status 204 (no content)
                 Key: MRM-2036
                 URL: https://issues.apache.org/jira/browse/MRM-2036
             Project: Archiva
          Issue Type: Bug
          Components: Archiva Components, rest services
    Affects Versions: 2.2.5, 2.2.8
         Environment: Ubuntu 20.04, Tomcat 8.5.71
            Reporter: Kilian Felder
         Attachments: archiva_web_gui_01.png, archiva_web_gui_02.png

When I use the command
{noformat}wget --spider '.../searchService/artifact?...v=LATEST'{noformat}
I expect to get the latest JAR, WAR or PDF file of the queried artifact.

This works as expected when I do my query for an artifact which contains JAR files. But it does not work when I do the query for an artifact which contains WAR files as you can see below ..
{noformat}$ wget --spider 'http://localhost:8080/archiva/restServices/archivaServices/searchService/artifact?r=internal&g=ch.nextstride.gui&a=NsMax&v=LATEST'
Spider mode enabled. Check if remote file exists.
--2022-01-12 17:20:11--  http://localhost:8080/archiva/restServices/archivaServices/searchService/artifact?r=internal&g=ch.nextstride.gui&a=NsMax&v=LATEST
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... connected.
HTTP request sent, awaiting response... 204
Remote file exists.{noformat}
{noformat}$ curl -iv 'http://localhost:8080/archiva/restServices/archivaServices/searchService/artifact?r=internal&g=ch.nextstride.gui&a=NsMax&v=LATEST'
*   Trying ::1:8080...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET /archiva/restServices/archivaServices/searchService/artifact?r=internal&g=ch.nextstride.gui&a=NsMax&v=LATEST HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 204
HTTP/1.1 204
< Set-Cookie: JSESSIONID=99DB93EFA7840255632173DEFD1D3BAF; Path=/archiva; HttpOnly
Set-Cookie: JSESSIONID=99DB93EFA7840255632173DEFD1D3BAF; Path=/archiva; HttpOnly
< Date: Wed, 12 Jan 2022 16:22:57 GMT
Date: Wed, 12 Jan 2022 16:22:57 GMT

<
* Connection #0 to host localhost left intact{noformat}

The Archiva Web-GUI shows these entries as you can see in the attached Screenshots 'archiva_web_gui_01.png' and 'archiva_web_gui_02.png'




--
This message was sent by Atlassian Jira
(v8.20.1#820001)