Skip to content

Bug : DownloadArtifact reading request body instead of response body #375

@Manar-Elhabbal7

Description

@Manar-Elhabbal7

Describe the bug

The DownloadArtifact function incorrectly reads from req.Body instead of resp.Body after executing the HTTP request.

Current implementation:

respBody, err := io.ReadAll(req.Body)

This causes the function to read the request payload rather than the server response body, which may lead to empty or invalid artifact content when using import-url functionality.

Expected behavior:

Microcks has discovered 'SUCCESS_FROM_SERVER'

Actual behavior:

Microcks has discovered ''

How to Reproduce?

No response

Microcks version or git rev

No response

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions