Skip to content

Conversation

@Joibel
Copy link
Member

@Joibel Joibel commented Aug 5, 2025

(cherry picked from commit 9ed9ed9) (cherry picked from commit 44754be)

Signed-off-by: Mason Malone <651224+MasonM@users.noreply.github.com>
(cherry picked from commit 9ed9ed9)
(cherry picked from commit 44754be)
@Joibel Joibel force-pushed the cherry-pick-14567-36 branch from 0629bce to d357886 Compare August 5, 2025 11:48
@Joibel Joibel merged commit 3e983d4 into release-3.6 Aug 5, 2025
25 of 28 checks passed
@Joibel Joibel deleted the cherry-pick-14567-36 branch August 5, 2025 12:41
MasonM added a commit to MasonM/argo-workflows that referenced this pull request Aug 9, 2025
On `release-3.6`, the `TestArgoServerSuite/TestReadinessProbe` test is
failing with `invalid "Content-Type" response header`. Example:
https://github.com/argoproj/argo-workflows/actions/runs/16828111449/job/47669457916

That test was backported in
argoproj#14742, but it's conflicting
with the changes in argoproj#11707,
which haven't been backported to `release-3.6`. The latter PR changed the
behavior of the server when `STATIC_FILES` is disabled. Before that change, the
response for the root path won't have `Content-Type: text/html`, but aftewards
it does, even though the response body is empty (since `index.html` will
be an empty file when `STATIC_FILES=false`).

Before:
```
$ curl http://localhost:2746 -v
* Host localhost:2746 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:2746...
* Connected to localhost (::1) port 2746
> GET / HTTP/1.1
> Host: localhost:2746
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Security-Policy: default-src 'self' 'unsafe-inline'; img-src 'self' data:
< X-Frame-Options: SAMEORIGIN
< X-Ratelimit-Limit: 1000
< X-Ratelimit-Remaining: 999
< X-Ratelimit-Reset: Sat, 09 Aug 2025 02:19:43 UTC
< Date: Sat, 09 Aug 2025 02:19:43 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
```

After:
```
 $ curl http://localhost:2746 -v
* Host localhost:2746 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:2746...
* Connected to localhost (::1) port 2746
> GET / HTTP/1.1
> Host: localhost:2746
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Content-Length: 0
< Content-Security-Policy: default-src 'self' 'unsafe-inline'; img-src 'self' data:
< Content-Type: text/html; charset=utf-8
< Last-Modified: Sat, 09 Aug 2025 02:33:08 GMT
< X-Frame-Options: SAMEORIGIN
< X-Ratelimit-Limit: 1000
< X-Ratelimit-Remaining: 999
< X-Ratelimit-Reset: Sat, 09 Aug 2025 02:33:08 UTC
< Date: Sat, 09 Aug 2025 02:33:08 GMT
 ```

The fix is simply removing the `HasContentType()` assertion, though
alternatively we could backport
argoproj#11707.

Signed-off-by: Mason Malone <651224+MasonM@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants