Claus Ibsen created CAMEL-25975:
-----------------------------------

             Summary: camel-stream - the stream:http consumer requests the URL 
twice when it starts
                 Key: CAMEL-25975
                 URL: https://issues.apache.org/jira/browse/CAMEL-25975
             Project: Camel
          Issue Type: Bug
          Components: camel-stream
    Affects Versions: 4.18.0, 4.22.0, 4.23.0
            Reporter: Claus Ibsen
             Fix For: 4.24.0


The {{stream:http}} consumer requests the URL twice when it starts. 
{{StreamConsumer.doStart}} opens the stream (main e6885df7894d, line 98), and 
{{run}} opens it again (line 264), so the first response is never read, and the 
server gets two requests.

Checked on 4.24.0-SNAPSHOT with {{camel run}} and a local {{python3 -m 
http.server}}: one start of 
{{stream:http?httpUrl=http://127.0.0.1:8097/data.txt}} gave two {{GET 
/data.txt}} in the log of the server. From the code, the {{stream:file}} 
consumer opens its file twice in the same way.

*Proposed change*: open the stream once, in {{run}}.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to