Inexplicable "net::ERR_FAILED" and "status": 0 responses

1. The problem I’m having:

I’ve recently begun uploading large files from my static web app to my back-end web API in a streaming fashion. Caddy serves the static web app and proxies request to the API.

Sporadically, though usually after a short period of site inactivity, this particular request that POSTs large files will fail between 10 seconds and 1.5 minutes. Requests that preceded this failed upload worked just fine. Refreshing the page and uploading the same file in the same manner will succeed.

Not really sure what to make of this. Logs below, but I’m having a heck of a time getting consistent log output. I’ll keep trying.

2. Error messages and/or full log output:

A couple of these POST requests show "status": 0, though I have no idea why. These are requests I made in Chromium; sitting at my desk watching the upload proceed until failure.

2024/05/06 15:27:00.611	INFO	http.log.access.log0	handled request	{"request": {"remote_ip": "70.139.128.239", "remote_port": "47476", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "POST", "host": "dev.crypter.dev", "uri": "/api/file/transfer", "headers": {"Content-Type": ["multipart/form-data; boundary=\"50feb114-4a0a-443c-a936-cdabbc2ec5ca\""], "Sec-Fetch-Mode": ["cors"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Pragma": ["no-cache"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Origin": ["https://dev.crypter.dev"], "Referer": ["https://dev.crypter.dev/"], "Priority": ["u=1, i"], "Sec-Ch-Ua": ["\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\""], "Accept": ["*/*"], "Sec-Fetch-Dest": ["empty"], "Accept-Language": ["en-US,en;q=0.9"], "Cache-Control": ["no-cache"], "Sec-Ch-Ua-Platform": ["\"Linux\""], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Fetch-Site": ["same-origin"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "bytes_read": 67036512, "user_id": "", "duration": 11.853345435, "size": 0, "status": 0, "resp_headers": {"Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"]}}

2024/05/07 00:36:57.129	INFO	http.log.access.log0	handled request	{"request": {"remote_ip": "70.139.128.239", "remote_port": "58618", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "POST", "host": "dev.crypter.dev", "uri": "/api/file/transfer", "headers": {"Sec-Fetch-Dest": ["empty"], "Accept-Language": ["en-US,en;q=0.9"], "Pragma": ["no-cache"], "Sec-Ch-Ua-Platform": ["\"Linux\""], "Sec-Fetch-Mode": ["cors"], "Accept": ["*/*"], "Priority": ["u=1, i"], "Sec-Fetch-Site": ["same-origin"], "Referer": ["https://dev.crypter.dev/"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Cache-Control": ["no-cache"], "Sec-Ch-Ua": ["\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\""], "Origin": ["https://dev.crypter.dev"], "Sec-Ch-Ua-Mobile": ["?0"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Content-Type": ["multipart/form-data; boundary=\"6cb54cee-1ba9-4373-9ad6-96eee88f7667\""]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "bytes_read": 134151004, "user_id": "", "duration": 114.735769766, "size": 0, "status": 0, "resp_headers": {"Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"]}}

3. Caddy version:

caddy:2.7-alpine

4. How I installed and ran Caddy:

FROM mcr.microsoft.com/dotnet/sdk:9.0-preview AS build
WORKDIR /source/

SHELL ["/bin/bash", "-c"]

RUN apt-get update -yq && apt-get upgrade -yq && apt-get install -yq curl git nano
RUN curl -fsSL https://deb.nodesource.com/setup_21.x | bash - && apt-get install -yq nodejs
RUN npm install --global pnpm \
    && SHELL=bash pnpm setup \
    && source /root/.bashrc

COPY ../*.sln .
COPY ../Crypter.Common/*.csproj ./Crypter.Common/
COPY ../Crypter.Common.Client/*.csproj ./Crypter.Common.Client/
COPY ../Crypter.Crypto.Common/*.csproj ./Crypter.Crypto.Common/
COPY ../Crypter.Crypto.Providers.Browser/*.csproj ./Crypter.Crypto.Providers.Browser/
COPY ../Crypter.Web/*.csproj ./Crypter.Web/

RUN dotnet restore Crypter.Web

COPY Crypter.Common/. ./Crypter.Common/
COPY Crypter.Common.Client/. ./Crypter.Common.Client/
COPY Crypter.Crypto.Common/. ./Crypter.Crypto.Common/
COPY Crypter.Crypto.Providers.Browser/. ./Crypter.Crypto.Providers.Browser/
COPY Crypter.Web/. ./Crypter.Web/

RUN dotnet publish Crypter.Web --no-restore --configuration release /p:TreatWarningsAsErrors=true /warnaserror --output /app/

FROM caddy:2.7-alpine AS webhost
COPY Crypter.Web/Caddyfile /etc/caddy/Caddyfile
COPY --from=build /app/wwwroot/ /srv/
EXPOSE 80
EXPOSE 443

a. System environment:

b. Command:

/usr/bin/docker compose --profile local up

c. Service/unit/compose file:

services:
  api:
    profiles:
      - web
      - local
    image: ghcr.io/crypter-file-transfer/${API_IMAGE_NAME:-crypter_api}:latest
    build:
      context: .
      dockerfile: Crypter.API/Dockerfile
    expose:
      - "80"
    environment:
      ASPNETCORE_ENVIRONMENT: ${API_ASPNETCORE_ENVIRONMENT-Production}
      ASPNETCORE_URLS: http://0.0.0.0:80
      ASPNETCORE_TransferStorageSettings__Location: /mnt/storage
      CUSTOMCONNSTR_DefaultConnection: host=${POSTGRES_HOST:-db};database=crypter;user id=crypter_user;pwd=${POSTGRES_USER_PASSWORD:-DEFAULT_PASSWORD};
      CUSTOMCONNSTR_HangfireConnection: host=${POSTGRES_HANGFIRE_HOST:-db};database=crypter_hangfire;user id=crypter_hangfire_user;pwd=${POSTGRES_HANGFIRE_USER_PASSWORD:-DEFAULT_PASSWORD};
    volumes:
      - ${API_STORAGE_PATH}:/mnt/storage
      - ${API_SETTINGS_FILE}:/app/appsettings.json
    restart: always
  web:
    profiles:
      - web
      - local
    image: ghcr.io/crypter-file-transfer/${WEB_IMAGE_NAME:-crypter_web}:latest
    build:
      context: .
      dockerfile: Crypter.Web/Dockerfile
    ports:
      - ${WEB_BIND_PORT-80}:80
      - ${WEB_SECURE_BIND_PORT-443}:443
    environment:
      CRYPTER_API_BASE: http://api:80
      CADDY_DOMAIN: ${CADDY_DOMAIN}
      CADDY_REDIRECT_TO_WWW: ${CADDY_REDIRECT_TO_WWW}
      CADDY_OPTIONS: ${CADDY_OPTIONS}
      CADDY_TLS_VOLUME: ${CADDY_TLS_VOLUME}
      CADDY_MAX_REQUEST_BODY: ${CADDY_MAX_REQUEST_BODY}
    volumes:
      - ./Volumes/Caddy/data:/data
      - ${CADDY_TLS_VOLUME}:/mnt/tls
    restart: always

d. My complete Caddy config:

dev.crypter.dev {

	log {
		output file /var/log/caddy
		format console
	}

    rewrite /serviceWorker /srv/js/dist/serviceWorker

	handle /api/* {
		request_body {
			max_size 251MB
		}

		reverse_proxy http://api:80
	}

    handle /srv/js/dist/serviceWorker {
        root * /srv/js/dist/serviceWorker
    
        try_files {path} /serviceWorker.js
    
        file_server {
            precompressed br gzip
        }
        
        header {
            Service-Worker-Allowed "/"
            Service-Worker "script"
        }
    }

	handle {
		root * /srv
		try_files {path} /index.html

		header ?Content-Type "application/octet-stream"

		file_server {
			precompressed br gzip
		}
	}
}

127.0.0.1 {
	redir https://www.{host}{uri} permanent
}

5. Links to relevant resources:


Those are just your access logs. What we need to see is your runtime logs. Enable the debug global option, then show your Caddy process logs (emitted to stderr).

This line doesn’t really make sense. rewrite takes an HTTP request path as an argument to rewrite to, but it seems like you gave it a filesystem path. Doesn’t seem correct.

Here, this only matches requests to exactly /srv/js/dist/serviceWorker and nothing else. Is that what you mean to do?

You know that the request coming into here will always have the path /srv/js/dist/serviceWorker, so try_files {path} will try to find a file at /srv/js/dist/serviceWorker/srv/js/dist/serviceWorker and never find it (the configured root + HTTP request path are concatenated together), so it always falls back to /serviceWorker.js.

This is just kinda weird. You could simplify all this by doing handle /serviceWorker and inside of that doing rewrite * /serviceWorker.js and not having a try_files at all.

2 Likes

Enable the debug global option, then show your Caddy process logs (emitted to stderr).

On it.

Regarding the /serviceWorker path, what I’m intending is for my SPA to not really need to know the details of where my service worker script is located on the server. If I decide to move the service worker script to /srv/js/willyNillyFolder, I’d like to do so without updating any code in my SPA.

Yes, I do intend to only serve a single file from this one location. I’m pretty novice when it comes to service workers, but I believe those specific headers need to be set by the server in order for the browser to register the service worker. Doesn’t make sense to me to set those headers for any other files.

I’ll try putting the rewrite inside of a handle /serviceWorker block. Thanks for the help.

Got it. "error": "context canceled"

2024/05/08 03:27:50.809	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "api:80", "duration": 3.440527277, "request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "POST", "host": "dev.crypter.dev", "uri": "/api/file/transfer", "headers": {"Sec-Fetch-Mode": ["cors"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Ch-Ua-Mobile": ["?0"], "X-Forwarded-For": ["70.139.128.239"], "X-Forwarded-Host": ["dev.crypter.dev"], "Accept": ["*/*"], "Priority": ["u=1, i"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Sec-Fetch-Dest": ["empty"], "X-Forwarded-Proto": ["https"], "Referer": ["https://dev.crypter.dev/"], "Sec-Ch-Ua-Platform": ["\"Linux\""], "Sec-Fetch-Site": ["same-origin"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Content-Type": ["multipart/form-data; boundary=\"8f3b6e51-6a21-4722-8794-2641c8beb88b\""], "Sec-Ch-Ua": ["\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\""], "Origin": ["https://dev.crypter.dev"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "error": "context canceled"}
/var/log # cat caddy.process
2024/05/08 03:27:25.160	INFO	admin	admin endpoint started	{"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2024/05/08 03:27:25.162	INFO	http.auto_https	server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS	{"server_name": "srv0", "https_port": 443}
2024/05/08 03:27:25.162	INFO	http.auto_https	enabling automatic HTTP->HTTPS redirects	{"server_name": "srv0"}
2024/05/08 03:27:25.167	INFO	tls.cache.maintenance	started background certificate maintenance	{"cache": "0xc00045f280"}
2024/05/08 03:27:25.168	DEBUG	http.auto_https	adjusted config	{"tls": {"automation":{"policies":[{"subjects":["127.0.0.1"]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}],"logs":{"logger_names":{"dev.crypter.dev":"log0"},"skip_hosts":["127.0.0.1"]}},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"group":"group4","handle":[{"handler":"rewrite","uri":"/srv/js/dist/serviceWorker"}],"match":[{"path":["/serviceWorker"]}]},{"group":"group3","handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"vars","root":"/srv/js/dist/serviceWorker"},{"handler":"headers","response":{"set":{"Service-Worker":["script"],"Service-Worker-Allowed":["/"]}}}]},{"handle":[{"handler":"rewrite","uri":"{http.matchers.file.relative}"}],"match":[{"file":{"try_files":["{http.request.uri.path}","/serviceWorker.js"]}}]},{"handle":[{"handler":"file_server","hide":["/etc/caddy/Caddyfile"],"precompressed":{"br":{},"gzip":{}},"precompressed_order":["br","gzip"]}]}]}],"match":[{"path":["/srv/js/dist/serviceWorker"]}]},{"group":"group3","handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"request_body","max_size":251000000},{"handler":"reverse_proxy","upstreams":[{"dial":"api:80"}]}]}]}],"match":[{"path":["/api/*"]}]},{"group":"group3","handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"vars","root":"/srv"},{"handler":"headers","response":{"require":{"headers":{"Content-Type":null}},"set":{"Content-Type":["application/octet-stream"]}}}]},{"handle":[{"handler":"rewrite","uri":"{http.matchers.file.relative}"}],"match":[{"file":{"try_files":["{http.request.uri.path}","/index.html"]}}]},{"handle":[{"handler":"file_server","hide":["/etc/caddy/Caddyfile"],"precompressed":{"br":{},"gzip":{}},"precompressed_order":["br","gzip"]}]}]}]}]}],"terminal":true},{"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"static_response","headers":{"Location":["https://www.{http.request.host}{http.request.uri}"]},"status_code":301}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{},"logs":{"logger_names":{"dev.crypter.dev":"log0"},"skip_hosts":["127.0.0.1"]}}}}}
2024/05/08 03:27:25.199	WARN	tls	storage cleaning happened too recently; skipping for now	{"storage": "FileStorage:/data/caddy", "instance": "f53ffca1-ef2a-48cc-a634-ef63d60296c8", "try_again": "2024/05/09 03:27:25.199", "try_again_in": 86399.99999905}
2024/05/08 03:27:25.199	INFO	tls	finished cleaning storage units
2024/05/08 03:27:25.306	WARN	pki.ca.local	installing root certificate (you might be prompted for password)	{"path": "storage:pki/authorities/local/root.crt"}
2024/05/08 03:27:25.454	INFO	http	enabling HTTP/3 listener	{"addr": ":443"}
2024/05/08 03:27:25.456	DEBUG	http	starting server loop	{"address": "[::]:443", "tls": true, "http3": true}
2024/05/08 03:27:25.456	INFO	http.log	server running	{"name": "srv0", "protocols": ["h1", "h2", "h3"]}
2024/05/08 03:27:25.456	DEBUG	http	starting server loop	{"address": "[::]:80", "tls": false, "http3": false}
2024/05/08 03:27:25.456	INFO	http.log	server running	{"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}
2024/05/08 03:27:25.456	INFO	http	enabling automatic TLS certificate management	{"domains": ["dev.crypter.dev", "127.0.0.1"]}
2024/05/08 03:27:25.460	DEBUG	tls	loading managed certificate	{"domain": "dev.crypter.dev", "expiration": "2024/07/11 01:27:38.000", "issuer_key": "acme-v02.api.letsencrypt.org-directory", "storage": "FileStorage:/data/caddy"}
2024/05/08 03:27:25.461	DEBUG	tls.cache	added certificate to cache	{"subjects": ["dev.crypter.dev"], "expiration": "2024/07/11 01:27:38.000", "managed": true, "issuer_key": "acme-v02.api.letsencrypt.org-directory", "hash": "5d50682776d2f7dec18d7877c1295b06abcbe5cfb97bbfe75c5ac0f8e5823dbf", "cache_size": 1, "cache_capacity": 10000}
2024/05/08 03:27:25.461	DEBUG	events	event	{"name": "cached_managed_cert", "id": "86529cd8-194f-46db-a486-38d8acb35699", "origin": "tls", "data": {"sans":["dev.crypter.dev"]}}
2024/05/08 03:27:25.463	WARN	tls	stapling OCSP	{"error": "no OCSP stapling for [127.0.0.1]: no OCSP server specified in certificate", "identifiers": ["127.0.0.1"]}
2024/05/08 03:27:25.463	DEBUG	tls.cache	added certificate to cache	{"subjects": ["127.0.0.1"], "expiration": "2024/05/08 11:46:51.000", "managed": true, "issuer_key": "local", "hash": "70bab08ec20e86d481d38e3889394523b7a33aa9ee646512f8b5e91d1264faf9", "cache_size": 2, "cache_capacity": 10000}
2024/05/08 03:27:25.463	DEBUG	events	event	{"name": "cached_managed_cert", "id": "9c3fd3e4-b26c-432f-a8e4-b030b79a0002", "origin": "tls", "data": {"sans":["127.0.0.1"]}}
2024/05/08 03:27:25.466	INFO	autosaved config (load with --resume flag)	{"file": "/config/caddy/autosave.json"}
2024/05/08 03:27:25.466	INFO	serving initial configuration
2024/05/08 03:27:38.603	INFO	http.log.access	handled request	{"request": {"remote_ip": "122.224.129.234", "remote_port": "47912", "client_ip": "122.224.129.234", "proto": "HTTP/1.0", "method": "GET", "host": "", "uri": "/", "headers": {}}, "bytes_read": 0, "user_id": "", "duration": 0.000048447, "size": 0, "status": 308, "resp_headers": {"Location": ["https:///"], "Content-Type": [], "Server": ["Caddy"], "Connection": ["close"]}}
2024/05/08 03:27:39.696	DEBUG	events	event	{"name": "tls_get_certificate", "id": "09d3d476-1fe4-4aa9-9f55-04a612cf9690", "origin": "tls", "data": {"client_hello":{"CipherSuites":[60138,4865,4866,4867,49195,49199,49196,49200,52393,52392,49171,49172,156,157,47,53],"ServerName":"dev.crypter.dev","SupportedCurves":[10794,25497,29,23,24],"SupportedPoints":"AA==","SignatureSchemes":[1027,2052,1025,1283,2053,1281,2054,1537],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[14906,772,771],"RemoteAddr":{"IP":"70.139.128.239","Port":52018,"Zone":""},"LocalAddr":{"IP":"172.18.0.3","Port":443,"Zone":""}}}}
2024/05/08 03:27:39.696	DEBUG	tls.handshake	choosing certificate	{"identifier": "dev.crypter.dev", "num_choices": 1}
2024/05/08 03:27:39.696	DEBUG	tls.handshake	default certificate selection results	{"identifier": "dev.crypter.dev", "subjects": ["dev.crypter.dev"], "managed": true, "issuer_key": "acme-v02.api.letsencrypt.org-directory", "hash": "5d50682776d2f7dec18d7877c1295b06abcbe5cfb97bbfe75c5ac0f8e5823dbf"}
2024/05/08 03:27:39.697	DEBUG	tls.handshake	matched certificate in cache	{"remote_ip": "70.139.128.239", "remote_port": "52018", "subjects": ["dev.crypter.dev"], "managed": true, "expiration": "2024/07/11 01:27:38.000", "hash": "5d50682776d2f7dec18d7877c1295b06abcbe5cfb97bbfe75c5ac0f8e5823dbf"}
2024/05/08 03:27:39.808	DEBUG	http.handlers.rewrite	rewrote request	{"request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "GET", "host": "dev.crypter.dev", "uri": "/", "headers": {"Sec-Fetch-Site": ["none"], "If-None-Match": ["\"sd5caovj\""], "Priority": ["u=0, i"], "Sec-Fetch-Dest": ["document"], "Cache-Control": ["max-age=0"], "Sec-Ch-Ua": ["\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\""], "Upgrade-Insecure-Requests": ["1"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"], "Sec-Fetch-User": ["?1"], "Sec-Fetch-Mode": ["navigate"], "Accept-Language": ["en-US,en;q=0.9"], "If-Modified-Since": ["Wed, 08 May 2024 02:58:11 GMT"], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Ch-Ua-Platform": ["\"Linux\""], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Accept-Encoding": ["gzip, deflate, br, zstd"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "method": "GET", "uri": "/index.html"}
2024/05/08 03:27:39.808	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/index.html", "result": "/srv/index.html"}
2024/05/08 03:27:39.808	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/index.html.br"}
2024/05/08 03:27:39.922	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/favicon.ico", "result": "/srv/favicon.ico"}
2024/05/08 03:27:39.923	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/favicon.ico.br"}
2024/05/08 03:27:39.996	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/_framework/blazor.boot.json", "result": "/srv/_framework/blazor.boot.json"}
2024/05/08 03:27:39.996	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/_framework/blazor.boot.json.br"}
2024/05/08 03:27:40.113	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/appsettings.json", "result": "/srv/appsettings.json"}
2024/05/08 03:27:40.113	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/appsettings.json.br"}
2024/05/08 03:27:40.115	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/_framework/Crypter.Web.wasm", "result": "/srv/_framework/Crypter.Web.wasm"}
2024/05/08 03:27:40.115	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/_framework/Crypter.Web.wasm.br"}
2024/05/08 03:27:40.971	DEBUG	http.handlers.reverse_proxy	selected upstream	{"dial": "api:80", "total_upstreams": 1}
2024/05/08 03:27:41.494	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "api:80", "duration": 0.522968428, "request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "GET", "host": "dev.crypter.dev", "uri": "/api/metrics/storage/public", "headers": {"Sec-Ch-Ua-Mobile": ["?0"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Ch-Ua": ["\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\""], "X-Forwarded-For": ["70.139.128.239"], "X-Forwarded-Proto": ["https"], "X-Forwarded-Host": ["dev.crypter.dev"], "Sec-Fetch-Site": ["same-origin"], "Accept": ["*/*"], "Sec-Fetch-Dest": ["empty"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Referer": ["https://dev.crypter.dev/"], "Priority": ["u=1, i"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Sec-Ch-Ua-Platform": ["\"Linux\""], "Sec-Fetch-Mode": ["cors"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "headers": {"Content-Type": ["application/json; charset=utf-8"], "Date": ["Wed, 08 May 2024 03:27:41 GMT"], "Server": ["Kestrel"]}, "status": 200}
2024/05/08 03:27:42.556	DEBUG	http.handlers.rewrite	rewrote request	{"request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "GET", "host": "dev.crypter.dev", "uri": "/serviceWorker", "headers": {"Cache-Control": ["max-age=0"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Accept": ["*/*"], "Sec-Fetch-Mode": ["same-origin"], "Referer": ["https://dev.crypter.dev/serviceWorker"], "If-Modified-Since": ["Wed, 08 May 2024 02:58:52 GMT"], "Sec-Fetch-Dest": ["serviceworker"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"], "Priority": ["u=4, i"], "Service-Worker": ["script"], "Sec-Fetch-Site": ["same-origin"], "If-None-Match": ["\"sd5ca42e9\""]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "method": "GET", "uri": "/srv/js/dist/serviceWorker"}
2024/05/08 03:27:42.556	DEBUG	http.handlers.rewrite	rewrote request	{"request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "GET", "host": "dev.crypter.dev", "uri": "/srv/js/dist/serviceWorker", "headers": {"Cache-Control": ["max-age=0"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Accept": ["*/*"], "Sec-Fetch-Mode": ["same-origin"], "Referer": ["https://dev.crypter.dev/serviceWorker"], "Sec-Fetch-Dest": ["serviceworker"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"], "If-Modified-Since": ["Wed, 08 May 2024 02:58:52 GMT"], "Service-Worker": ["script"], "Sec-Fetch-Site": ["same-origin"], "If-None-Match": ["\"sd5ca42e9\""], "Priority": ["u=4, i"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "method": "GET", "uri": "/serviceWorker.js"}
2024/05/08 03:27:42.556	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv/js/dist/serviceWorker", "request_path": "/serviceWorker.js", "result": "/srv/js/dist/serviceWorker/serviceWorker.js"}
2024/05/08 03:27:42.556	DEBUG	http.handlers.file_server	precompressed file not accessible	{"filename": "/srv/js/dist/serviceWorker/serviceWorker.js.br", "error": "stat /srv/js/dist/serviceWorker/serviceWorker.js.br: no such file or directory"}
2024/05/08 03:27:42.556	DEBUG	http.handlers.file_server	precompressed file not accessible	{"filename": "/srv/js/dist/serviceWorker/serviceWorker.js.gz", "error": "stat /srv/js/dist/serviceWorker/serviceWorker.js.gz: no such file or directory"}
2024/05/08 03:27:42.556	DEBUG	http.handlers.file_server	opening file	{"filename": "/srv/js/dist/serviceWorker/serviceWorker.js"}
2024/05/08 03:27:47.369	DEBUG	http.handlers.reverse_proxy	selected upstream	{"dial": "api:80", "total_upstreams": 1}
2024/05/08 03:27:50.809	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "api:80", "duration": 3.440527277, "request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "POST", "host": "dev.crypter.dev", "uri": "/api/file/transfer", "headers": {"Sec-Fetch-Mode": ["cors"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Ch-Ua-Mobile": ["?0"], "X-Forwarded-For": ["70.139.128.239"], "X-Forwarded-Host": ["dev.crypter.dev"], "Accept": ["*/*"], "Priority": ["u=1, i"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Sec-Fetch-Dest": ["empty"], "X-Forwarded-Proto": ["https"], "Referer": ["https://dev.crypter.dev/"], "Sec-Ch-Ua-Platform": ["\"Linux\""], "Sec-Fetch-Site": ["same-origin"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Content-Type": ["multipart/form-data; boundary=\"8f3b6e51-6a21-4722-8794-2641c8beb88b\""], "Sec-Ch-Ua": ["\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\""], "Origin": ["https://dev.crypter.dev"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "error": "context canceled"}
2024/05/08 03:27:55.459	DEBUG	http.handlers.rewrite	rewrote request	{"request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "GET", "host": "dev.crypter.dev", "uri": "/", "headers": {"Sec-Ch-Ua": ["\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\""], "Sec-Fetch-Mode": ["no-cors"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Ch-Ua-Platform": ["\"Linux\""], "If-None-Match": ["\"sd5djkvj\""], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Accept": ["*/*"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Dest": ["empty"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "If-Modified-Since": ["Wed, 08 May 2024 03:24:57 GMT"], "Priority": ["u=1, i"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "method": "GET", "uri": "/index.html"}
2024/05/08 03:27:55.459	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/index.html", "result": "/srv/index.html"}
2024/05/08 03:27:55.459	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/index.html.br"}
2024/05/08 03:27:55.561	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/lib/bootstrap-5.2.3-dist/js/bootstrap.bundle.min.js.map", "result": "/srv/lib/bootstrap-5.2.3-dist/js/bootstrap.bundle.min.js.map"}
2024/05/08 03:27:55.562	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/lib/bootstrap-5.2.3-dist/js/bootstrap.bundle.min.js.map.br"}
2024/05/08 03:27:55.562	DEBUG	http.handlers.rewrite	rewrote request	{"request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "GET", "host": "dev.crypter.dev", "uri": "/_framework/dotnet.js.map", "headers": {"Cache-Control": ["no-cache"], "Sec-Fetch-Mode": ["no-cors"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Priority": ["u=4, i"], "Pragma": ["no-cache"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Dest": ["empty"], "Accept-Language": ["en-US,en;q=0.9"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "method": "GET", "uri": "/index.html"}
2024/05/08 03:27:55.562	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/index.html", "result": "/srv/index.html"}
2024/05/08 03:27:55.562	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/index.html.br"}
2024/05/08 03:27:55.563	DEBUG	http.handlers.rewrite	rewrote request	{"request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "GET", "host": "dev.crypter.dev", "uri": "/_framework/dotnet.runtime.js.map", "headers": {"Pragma": ["no-cache"], "Cache-Control": ["no-cache"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Dest": ["empty"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Priority": ["u=4, i"], "Sec-Fetch-Mode": ["no-cors"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "method": "GET", "uri": "/index.html"}
2024/05/08 03:27:55.563	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/index.html", "result": "/srv/index.html"}
2024/05/08 03:27:55.563	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/index.html.br"}
2024/05/08 03:27:55.629	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": "/srv", "request_path": "/lib/bootstrap-5.2.3-dist/css/bootstrap.min.css.map", "result": "/srv/lib/bootstrap-5.2.3-dist/css/bootstrap.min.css.map"}
2024/05/08 03:27:55.629	DEBUG	http.handlers.file_server	opening compressed sidecar file	{"filename": "/srv/lib/bootstrap-5.2.3-dist/css/bootstrap.min.css.map.br"}

Edit: Fixed. Needed to add a root directive.

Since it got brought up. Getting 404 with the following directive:
image

handle /serviceWorker {
    rewrite * /srv/js/dist/serviceWorker/serviceWorker.js
  
    file_server {
        precompressed br gzip
    }
    
    header {
        Service-Worker-Allowed "/"
        Service-Worker "script"
    }
}
2024/05/08 03:45:55.696	DEBUG	http.handlers.rewrite	rewrote request	{"request": {"remote_ip": "70.139.128.239", "remote_port": "54564", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "GET", "host": "dev.crypter.dev", "uri": "/serviceWorker", "headers": {"Service-Worker": ["script"], "Referer": ["https://dev.crypter.dev/"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"], "Accept": ["*/*"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["same-origin"], "Sec-Fetch-Dest": ["serviceworker"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Priority": ["u=4, i"], "Cache-Control": ["max-age=0"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "method": "GET", "uri": "/srv/js/dist/serviceWorker/serviceWorker.js"}
2024/05/08 03:45:55.696	DEBUG	http.handlers.file_server	sanitized path join	{"site_root": ".", "request_path": "/srv/js/dist/serviceWorker/serviceWorker.js", "result": "srv/js/dist/serviceWorker/serviceWorker.js"}
2024/05/08 03:45:55.696	DEBUG	http.log.error.log0	{id=ts2r3nvi2} fileserver.(*FileServer).notFound (staticfiles.go:629): HTTP 404	{"request": {"remote_ip": "70.139.128.239", "remote_port": "54564", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "GET", "host": "dev.crypter.dev", "uri": "/serviceWorker", "headers": {"Accept": ["*/*"], "Service-Worker": ["script"], "Referer": ["https://dev.crypter.dev/"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"], "Cache-Control": ["max-age=0"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["same-origin"], "Sec-Fetch-Dest": ["serviceworker"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Priority": ["u=4, i"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "duration": 0.000268474, "status": 404, "err_id": "ts2r3nvi2", "err_trace": "fileserver.(*FileServer).notFound (staticfiles.go:629)"}

No you misunderstood, you need root * /srv, and rewrite * /js/dist/serviceWorker/serviceWorker.js

Looks like you don’t have any precompressed files on disk, so remove precompressed br gzip.

1 Like

That’s an application compilation bug I’ll have to resolve later. There should be compressed assets there, eventually.

The issue with the dropped request persists.

{
    debug
    
    log default {
        output file /var/log/caddy.process
        format console
        level DEBUG
    }
}

{$CADDY_DOMAIN} {
	{$CADDY_OPTIONS}

	log {
		output file /var/log/caddy.access
		format console
		level DEBUG
	}

	handle /api/* {
		request_body {
			max_size {$CADDY_MAX_REQUEST_BODY}
		}

		reverse_proxy {$CRYPTER_API_BASE}
	}

    handle /serviceWorker {
        root * /srv
        rewrite * js/dist/serviceWorker/serviceWorker.js
    
        file_server {
            precompressed br gzip
        }
        
        header {
            Service-Worker-Allowed "/"
            Service-Worker "script"
        }
    }

	handle {
		root * /srv
		try_files {path} /index.html

		header ?Content-Type "application/octet-stream"

		file_server {
			precompressed br gzip
		}
	}
}

{$CADDY_REDIRECT_TO_WWW} {
	redir https://www.{host}{uri} permanent
}

Any ideas on the "error": "context canceled" message resulting in a "status": 0 request?

2024/05/08 03:27:50.809	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "api:80", "duration": 3.440527277, "request": {"remote_ip": "70.139.128.239", "remote_port": "52018", "client_ip": "70.139.128.239", "proto": "HTTP/2.0", "method": "POST", "host": "dev.crypter.dev", "uri": "/api/file/transfer", "headers": {"Sec-Fetch-Mode": ["cors"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Ch-Ua-Mobile": ["?0"], "X-Forwarded-For": ["70.139.128.239"], "X-Forwarded-Host": ["dev.crypter.dev"], "Accept": ["*/*"], "Priority": ["u=1, i"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"], "Sec-Fetch-Dest": ["empty"], "X-Forwarded-Proto": ["https"], "Referer": ["https://dev.crypter.dev/"], "Sec-Ch-Ua-Platform": ["\"Linux\""], "Sec-Fetch-Site": ["same-origin"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Content-Type": ["multipart/form-data; boundary=\"8f3b6e51-6a21-4722-8794-2641c8beb88b\""], "Sec-Ch-Ua": ["\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\""], "Origin": ["https://dev.crypter.dev"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "dev.crypter.dev"}}, "error": "context canceled"}

That usually means the client canceled the request. Can you reproduce it with curl -v?

Currently no, I cannot reproduce using the cURL below. I’ve run this many times by itself and a few times in-tandem with an identical request from the browser. The browser request fails while the cURL succeeds.

It was strange since this really appeared to be a server-side problem. The issue normally occurs after a deployment of my docker-compose profile as well as after a period of inactivity. Refreshing the browser page and trying the same file again has always succeeded. I don’t want to rule out that this could be a server-side problem, but I’ll look into my code and the SPA framework I’m using once more.

curl 'https://dev.crypter.dev/api/file/transfer' \
  -v \
  -X 'POST' \
  -H 'accept: */*' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data' \
  -H 'origin: https://dev.crypter.dev' \
  -H 'pragma: no-cache' \
  -H 'priority: u=1, i' \
  -H 'referer: https://dev.crypter.dev/' \
  -H 'sec-ch-ua: "Not-A.Brand";v="99", "Chromium";v="124"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \
  --form 'Data={"Filename":"test.txt","ContentType":"text/csv","PublicKey":"nxC6b2L5fWjLROFbNMmBxRX1GSC3nCSwU/GaM3hC4hk=","KeyExchangeNonce":"JAdv1MbzC7BGNiWfC+3JTinCEhf/+JUl0ySNeQfC7q4=","Proof":"i51Bn7mHZDcZ0u4xnd1CtyEL9RXJDjheogPHrv2vB5c=","LifetimeHours":24};type=application/json' \
  --form 'Ciphertext=@/home/jack/Downloads/test.txt'
|2024/05/09 16:33:43.297|DEBUG|http.handlers.reverse_proxy|upstream roundtrip|{upstream: api:80, duration: 12.104709284, request: {remote_ip: 70.139.128.239, remote_port: 51490, client_ip: 70.139.128.239, proto: HTTP/2.0, method: POST, host: dev.crypter.dev, uri: /api/file/transfer, headers: {Sec-Fetch-Site: [same-origin], Accept-Encoding: [gzip, deflate, br, zstd], Accept-Language: [en-US,en;q=0.9], X-Forwarded-For: [70.139.128.239], Referer: [https://dev.crypter.dev/], Sec-Fetch-Mode: [cors], Content-Type: [multipart/form-data; boundary=\6a37a521-fbb2-4154-a642-eab07035be95\], X-Forwarded-Host: [dev.crypter.dev], Sec-Ch-Ua-Platform: [\Linux\], Accept: [*/*], Sec-Fetch-Dest: [empty], Origin: [https://dev.crypter.dev], Sec-Ch-Ua: [\Not-A.Brand\;v=\99\, \Chromium\;v=\124\], Sec-Ch-Ua-Mobile: [?0], User-Agent: [Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36], X-Forwarded-Proto: [https], Priority: [u=1, i]}, tls: {resumed: true, version: 772, cipher_suite: 4865, proto: h2, server_name: dev.crypter.dev}}, error: context canceled}|
|---|---|---|---|---|
|2024/05/09 16:33:55.858|DEBUG|http.handlers.reverse_proxy|upstream roundtrip|{upstream: api:80, duration: 26.291192565, request: {remote_ip: 70.139.128.239, remote_port: 37212, client_ip: 70.139.128.239, proto: HTTP/2.0, method: POST, host: dev.crypter.dev, uri: /api/file/transfer, headers: {Sec-Ch-Ua: [\Not-A.Brand\;v=\99\, \Chromium\;v=\124\], Sec-Fetch-Site: [same-origin], Accept-Language: [en-US,en;q=0.9], User-Agent: [Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36], Cache-Control: [no-cache], X-Forwarded-Proto: [https], Priority: [u=1, i], Sec-Ch-Ua-Mobile: [?0], Sec-Fetch-Mode: [cors], Sec-Ch-Ua-Platform: [\Linux\], Origin: [https://dev.crypter.dev], Pragma: [no-cache], Content-Length: [250000564], X-Forwarded-For: [70.139.128.239], Accept: [*/*], Referer: [https://dev.crypter.dev/], Sec-Fetch-Dest: [empty], X-Forwarded-Host: [dev.crypter.dev], Content-Type: [multipart/form-data; boundary=------------------------b107120de30736ee]}, tls: {resumed: false, version: 772, cipher_suite: 4865, proto: h2, server_name: dev.crypter.dev}}, headers: {Content-Type: [application/json; charset=utf-8], Date: [Thu, 09 May 2024 16:33:54 GMT], Server: [Kestrel], Access-Control-Allow-Origin: [https://dev.crypter.dev]}, status: 200}|
1 Like

Hmm…

I’ve done some horrible things to bypass Caddy on my demo site.

Will resume testing tomorrow and potentially over the weekend, but I cannot reproduce this problem when Caddy is out of the picture. These large multipart/form-data uploads are working just fine when Kestrel web server is handling requests directly.

Supposing there is an issue with Caddy, what more information can I provide?

1 Like

Could you try with the latest release, Caddy v2.8.0-beta.2? The Docker image is available. There’s a chance whatever the problem is was fixed since :thinking:

1 Like

My buddy, who could more reliably reproduce the error, was able to reproduce the error using Kestrel.

I appreciate your attention on this issue. I think we can close this one.

1 Like

What was the problem?

2 Likes

I still don’t know. I’m opening a Chromium bug and linking this thread.

1 Like

https://issues.chromium.org/issues/339788214

2 Likes