diff --git a/IMPLEMENTATION.md b/IMPLEMENTATION.md index 652b55a..52a76f3 100644 --- a/IMPLEMENTATION.md +++ b/IMPLEMENTATION.md @@ -36,6 +36,8 @@ This document outlines the implementation plan for ginxsom, a FastCGI-based Blos - [x] Handle 404s gracefully when blob doesn't exist - [x] Configure FastCGI pass-through for HEAD and non-GET requests +**Future Enhancement Note**: Consider implementing nginx Lua extension for true Blossom compliance with dynamic file discovery. The current approach uses explicit extension lists in `try_files`, which works well for common extensions but may not serve files with unusual extensions. Lua module would allow runtime directory scanning for hash-matching files regardless of extension. + ### 1.4 Basic HEAD Endpoint - [x] Implement FastCGI handler for `HEAD /` - [x] Query database for blob metadata (single source of truth) @@ -58,12 +60,32 @@ This document outlines the implementation plan for ginxsom, a FastCGI-based Blos ### 2.1 Nostr Authentication Setup - [ ] Integrate nostr_core_lib submodule -- [ ] Implement nostr event validation - - [ ] Verify event signature (schnorr) - - [ ] Validate event structure (kind 24242) - - [ ] Check required fields (t, expiration, x tags) - - [ ] Implement expiration checking -- [ ] Create authentication middleware + - [ ] Update Makefile to include nostr_core_lib paths and static library + - [ ] Build libnostr_core_x64.a using provided build.sh script + - [ ] Add system dependencies: -lsecp256k1 -lssl -lcrypto -lcurl -lz -ldl -lpthread -lm + +- [ ] Implement authentication functions in main.c (BUD-02 section): + - [ ] `parse_authorization_header()` - Extract JSON from "Nostr base64(event)" header + - [ ] `validate_blossom_event()` - Validate Blossom-specific requirements (kind 24242, content hash, method, expiration) + - [ ] `authenticate_request()` - Main orchestrator function + +- [ ] Leverage existing nostr_core_lib functions: + - [ ] Use `nostr_validate_event()` for structure + signature validation (from nip001.h) + - [ ] Use standardized error codes from nostr_common.h (NOSTR_SUCCESS, NOSTR_ERROR_EVENT_INVALID_SIGNATURE, etc.) + - [ ] Use `nostr_strerror()` for error message translation + +**Function Specifications:** +```c +// Custom functions to implement: +int parse_authorization_header(const char* auth_header, char* event_json, size_t json_size); +int validate_blossom_event(struct cJSON* event, const char* expected_hash, const char* method); +int authenticate_request(const char* auth_header, const char* method, const char* file_hash); + +// Existing nostr_core_lib functions to use directly: +// - nostr_validate_event(cJSON* event) - handles structure + signature validation +// - nostr_validate_event_structure(cJSON* event) - if separate validation needed +// - nostr_verify_event_signature(cJSON* event) - if separate signature check needed +``` ### 2.2 Upload Endpoint Implementation - [ ] Implement `PUT /upload` endpoint diff --git a/Makefile b/Makefile index be51725..002cebf 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ # Ginxsom Blossom Server Makefile CC = gcc -CFLAGS = -Wall -Wextra -std=c99 -O2 -LIBS = -lfcgi -lsqlite3 +CFLAGS = -Wall -Wextra -std=c99 -O2 -Inostr_core_lib/nostr_core -Inostr_core_lib/cjson +LIBS = -lfcgi -lsqlite3 nostr_core_lib/libnostr_core_x64.a -lz -ldl -lpthread -lm -L/usr/local/lib -lsecp256k1 -lssl -lcrypto -lcurl SRCDIR = src BUILDDIR = build TARGET = $(BUILDDIR)/ginxsom-fcgi diff --git a/build/ginxsom-fcgi b/build/ginxsom-fcgi index 5b909d3..045670f 100755 Binary files a/build/ginxsom-fcgi and b/build/ginxsom-fcgi differ diff --git a/build/main.o b/build/main.o index 986df6d..60d001f 100644 Binary files a/build/main.o and b/build/main.o differ diff --git a/config/fastcgi_params b/config/fastcgi_params new file mode 100644 index 0000000..765b6f0 --- /dev/null +++ b/config/fastcgi_params @@ -0,0 +1,24 @@ +fastcgi_param QUERY_STRING $query_string; +fastcgi_param REQUEST_METHOD $request_method; +fastcgi_param CONTENT_TYPE $content_type; +fastcgi_param CONTENT_LENGTH $content_length; + +fastcgi_param SCRIPT_NAME $fastcgi_script_name; +fastcgi_param REQUEST_URI $request_uri; +fastcgi_param DOCUMENT_URI $document_uri; +fastcgi_param DOCUMENT_ROOT $document_root; +fastcgi_param SERVER_PROTOCOL $server_protocol; +fastcgi_param REQUEST_SCHEME $scheme; +fastcgi_param HTTPS $https if_not_empty; + +fastcgi_param GATEWAY_INTERFACE CGI/1.1; +fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + +fastcgi_param REMOTE_ADDR $remote_addr; +fastcgi_param REMOTE_PORT $remote_port; +fastcgi_param SERVER_ADDR $server_addr; +fastcgi_param SERVER_PORT $server_port; +fastcgi_param SERVER_NAME $server_name; + +# PHP only, required if PHP was built with --enable-force-cgi-redirect +fastcgi_param REDIRECT_STATUS 200; diff --git a/config/local-nginx.conf b/config/local-nginx.conf index c73d166..bf00bcb 100644 --- a/config/local-nginx.conf +++ b/config/local-nginx.conf @@ -18,8 +18,8 @@ http { keepalive_timeout 65; types_hash_max_size 2048; - # MIME types - include /etc/nginx/mime.types; + # MIME types (local) + include mime.types; default_type application/octet-stream; # Logging (relative to prefix directory) @@ -58,9 +58,8 @@ http { } # GET requests served directly with explicit file extensions - # try_files /$1 =404; - # try_files /$1.webp =404; - try_files /$1.pdf /$1.jpg /$1.jpeg /$1.png /$1.webp /$1.gif /$1.mp4 /$1.mp3 =404; + # Potentially in the future look at a LUA extension + try_files /$1.jpg /$1.jpeg /$1.png /$1.webp /$1.gif /$1.pdf /$1.mp4 /$1.mp3 /$1.txt /$1.md=404; # Set appropriate headers for blobs add_header Cache-Control "public, max-age=31536000, immutable"; @@ -68,33 +67,7 @@ http { add_header X-Frame-Options DENY; add_header X-XSS-Protection "1; mode=block"; } - - # Commented out problematic regex for reference - # location ~ "^/([a-f0-9]{64}).*$" { - # limit_except HEAD GET { - # deny all; - # } - # - # # Debug headers to see what nginx is capturing - # add_header X-Debug-Hash "$1" always; - # add_header X-Debug-TryFiles "$1*" always; - # add_header X-Debug-URI "$uri" always; - # add_header X-Debug-Root "$document_root" always; - # - # # Route HEAD requests to FastCGI via rewrite - # if ($request_method = HEAD) { - # rewrite ^/(.*)$ /fcgi-head/$1 last; - # } - # - # # GET requests served directly with hash-only lookup - # try_files $1* =404; - # - # # Set appropriate headers for blobs - # add_header Cache-Control "public, max-age=31536000, immutable"; - # add_header X-Content-Type-Options nosniff; - # add_header X-Frame-Options DENY; - # add_header X-XSS-Protection "1; mode=block"; - # } + # FastCGI handler for HEAD requests location ~ "^/fcgi-head/([a-f0-9]{64}).*$" { @@ -116,6 +89,19 @@ http { } + # Upload endpoint - requires authentication + location /upload { + # Pass to FastCGI application for processing + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root/ginxsom.fcgi; + fastcgi_pass fastcgi_backend; + + # Only allow PUT method for uploads + if ($request_method !~ ^(PUT)$ ) { + return 405; + } + } + # Health check endpoint location /health { access_log off; diff --git a/config/mime.types b/config/mime.types new file mode 100644 index 0000000..d721056 --- /dev/null +++ b/config/mime.types @@ -0,0 +1,95 @@ +types { + text/html html htm shtml; + text/css css; + text/xml xml; + image/gif gif; + image/jpeg jpeg jpg; + image/png png; + image/webp webp; + application/javascript js; + application/atom+xml atom; + application/rss+xml rss; + + text/mathml mml; + text/plain txt; + text/vnd.sun.j2me.app-descriptor jad; + text/vnd.wap.wml wml; + text/x-component htc; + + image/avif avif; + image/svg+xml svg svgz; + image/tiff tif tiff; + image/vnd.wap.wbmp wbmp; + image/x-icon ico; + image/x-jng jng; + image/x-ms-bmp bmp; + + font/woff woff; + font/woff2 woff2; + + application/java-archive jar war ear; + application/json json; + application/mac-binhex40 hqx; + application/msword doc; + application/pdf pdf; + application/postscript ps eps ai; + application/rtf rtf; + application/vnd.apple.mpegurl m3u8; + application/vnd.google-earth.kml+xml kml; + application/vnd.google-earth.kmz kmz; + application/vnd.ms-excel xls; + application/vnd.ms-fontobject eot; + application/vnd.ms-powerpoint ppt; + application/vnd.oasis.opendocument.graphics odg; + application/vnd.oasis.opendocument.presentation odp; + application/vnd.oasis.opendocument.spreadsheet ods; + application/vnd.oasis.opendocument.text odt; + application/vnd.openxmlformats-officedocument.presentationml.presentation pptx; + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx; + application/vnd.openxmlformats-officedocument.wordprocessingml.document docx; + application/vnd.wap.wmlc wmlc; + application/wasm wasm; + application/x-7z-compressed 7z; + application/x-cocoa cco; + application/x-java-archive-diff jardiff; + application/x-java-jnlp-file jnlp; + application/x-makeself run; + application/x-perl pl pm; + application/x-pilot prc pdb; + application/x-rar-compressed rar; + application/x-redhat-package-manager rpm; + application/x-sea sea; + application/x-shockwave-flash swf; + application/x-stuffit sit; + application/x-tcl tcl tk; + application/x-x509-ca-cert der pem crt; + application/x-xpinstall xpi; + application/xhtml+xml xhtml; + application/xspf+xml xspf; + application/zip zip; + + application/octet-stream bin exe dll; + application/octet-stream deb; + application/octet-stream dmg; + application/octet-stream iso img; + application/octet-stream msi msp msm; + + audio/midi mid midi kar; + audio/mpeg mp3; + audio/ogg ogg; + audio/x-m4a m4a; + audio/x-realaudio ra; + + video/3gpp 3gpp 3gp; + video/mp2t ts; + video/mp4 mp4; + video/mpeg mpeg mpg; + video/quicktime mov; + video/webm webm; + video/x-flv flv; + video/x-m4v m4v; + video/x-mng mng; + video/x-ms-asf asx asf; + video/x-ms-wmv wmv; + video/x-msvideo avi; +} diff --git a/fastcgi_params b/fastcgi_params new file mode 100644 index 0000000..765b6f0 --- /dev/null +++ b/fastcgi_params @@ -0,0 +1,24 @@ +fastcgi_param QUERY_STRING $query_string; +fastcgi_param REQUEST_METHOD $request_method; +fastcgi_param CONTENT_TYPE $content_type; +fastcgi_param CONTENT_LENGTH $content_length; + +fastcgi_param SCRIPT_NAME $fastcgi_script_name; +fastcgi_param REQUEST_URI $request_uri; +fastcgi_param DOCUMENT_URI $document_uri; +fastcgi_param DOCUMENT_ROOT $document_root; +fastcgi_param SERVER_PROTOCOL $server_protocol; +fastcgi_param REQUEST_SCHEME $scheme; +fastcgi_param HTTPS $https if_not_empty; + +fastcgi_param GATEWAY_INTERFACE CGI/1.1; +fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + +fastcgi_param REMOTE_ADDR $remote_addr; +fastcgi_param REMOTE_PORT $remote_port; +fastcgi_param SERVER_ADDR $server_addr; +fastcgi_param SERVER_PORT $server_port; +fastcgi_param SERVER_NAME $server_name; + +# PHP only, required if PHP was built with --enable-force-cgi-redirect +fastcgi_param REDIRECT_STATUS 200; diff --git a/logs/access.log b/logs/access.log index 1e97938..2d74400 100644 --- a/logs/access.log +++ b/logs/access.log @@ -105,3 +105,9 @@ 127.0.0.1 - - [18/Aug/2025:22:40:32 -0400] "GET /708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp HTTP/1.1" 404 564 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36" 127.0.0.1 - - [18/Aug/2025:23:00:31 -0400] "GET /708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp HTTP/1.1" 200 203886 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36" 127.0.0.1 - - [18/Aug/2025:23:01:14 -0400] "GET /708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36" +127.0.0.1 - - [19/Aug/2025:06:00:05 -0400] "GET /708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36" +127.0.0.1 - - [19/Aug/2025:07:49:21 -0400] "PUT /upload HTTP/1.1" 405 166 "-" "curl/8.15.0" +127.0.0.1 - - [19/Aug/2025:07:49:21 -0400] "GET /21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6 HTTP/1.1" 404 162 "-" "curl/8.15.0" +127.0.0.1 - - [19/Aug/2025:07:51:54 -0400] "GET /708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36" +127.0.0.1 - - [19/Aug/2025:07:57:54 -0400] "PUT /upload HTTP/1.1" 501 38 "-" "curl/8.15.0" +127.0.0.1 - - [19/Aug/2025:07:57:54 -0400] "GET /ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9 HTTP/1.1" 404 162 "-" "curl/8.15.0" diff --git a/logs/error.log b/logs/error.log index 5253a5e..396b6c4 100644 --- a/logs/error.log +++ b/logs/error.log @@ -5719,3 +5719,1495 @@ X-XSS-Protection: 1; mode=block 2025/08/18 23:01:14 [debug] 296458#296458: timer delta: 0 2025/08/18 23:01:14 [debug] 296458#296458: worker cycle 2025/08/18 23:01:14 [debug] 296458#296458: epoll timer: 65000 +2025/08/18 23:02:19 [debug] 296458#296458: timer delta: 65068 +2025/08/18 23:02:19 [debug] 296458#296458: *1 event timer del: 6: 139272836 +2025/08/18 23:02:19 [debug] 296458#296458: *1 http keepalive handler +2025/08/18 23:02:19 [debug] 296458#296458: *1 close http connection: 6 +2025/08/18 23:02:19 [debug] 296458#296458: *1 reusable connection: 0 +2025/08/18 23:02:19 [debug] 296458#296458: *1 free: 0000000000000000 +2025/08/18 23:02:19 [debug] 296458#296458: *1 free: 00006261FA936840, unused: 136 +2025/08/18 23:02:19 [debug] 296458#296458: worker cycle +2025/08/18 23:02:19 [debug] 296458#296458: epoll timer: -1 +2025/08/19 06:00:03 [notice] 296457#296457: signal 15 (SIGTERM) received from 331227, exiting +2025/08/19 06:00:03 [debug] 296457#296457: wake up, sigio 0 +2025/08/19 06:00:03 [debug] 296457#296457: child: 0 296458 e:0 t:0 d:0 r:1 j:0 +2025/08/19 06:00:03 [debug] 296457#296457: termination cycle: 50 +2025/08/19 06:00:03 [debug] 296457#296457: sigsuspend +2025/08/19 06:00:03 [debug] 296458#296458: epoll: fd:7 ev:0001 d:0000762A6F3C30F8 +2025/08/19 06:00:03 [debug] 296458#296458: channel handler +2025/08/19 06:00:03 [debug] 296458#296458: channel: 32 +2025/08/19 06:00:03 [debug] 296458#296458: channel command: 4 +2025/08/19 06:00:03 [debug] 296458#296458: channel: -2 +2025/08/19 06:00:03 [debug] 296458#296458: timer delta: 25064175 +2025/08/19 06:00:03 [notice] 296458#296458: exiting +2025/08/19 06:00:03 [debug] 296458#296458: flush files +2025/08/19 06:00:03 [debug] 296458#296458: run cleanup: 00006261FA972428 +2025/08/19 06:00:03 [debug] 296458#296458: run cleanup: 00006261FA969F68 +2025/08/19 06:00:03 [debug] 296458#296458: cleanup resolver +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA970A20 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA96B900 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA9568A0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA950870 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA94F7B0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA94E6F0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA94D630 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA945160 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA93C130, unused: 0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA9463E0, unused: 0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA951880, unused: 0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA9578B0, unused: 0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA95B8C0, unused: 0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA95F8D0, unused: 0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA9638E0, unused: 0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA9678F0, unused: 0 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA96CA10, unused: 4 +2025/08/19 06:00:03 [debug] 296458#296458: free: 00006261FA9722F0, unused: 16048 +2025/08/19 06:00:03 [notice] 296458#296458: exit +2025/08/19 06:00:03 [notice] 296457#296457: signal 17 (SIGCHLD) received from 296458 +2025/08/19 06:00:03 [notice] 296457#296457: worker process 296458 exited with code 0 +2025/08/19 06:00:03 [debug] 296457#296457: shmtx forced unlock +2025/08/19 06:00:03 [debug] 296457#296457: wake up, sigio 3 +2025/08/19 06:00:03 [debug] 296457#296457: reap children +2025/08/19 06:00:03 [debug] 296457#296457: child: 0 296458 e:1 t:1 d:0 r:1 j:0 +2025/08/19 06:00:03 [notice] 296457#296457: exit +2025/08/19 06:00:03 [debug] 296457#296457: close listening 0.0.0.0:9001 #5 +2025/08/19 06:00:03 [debug] 296457#296457: run cleanup: 00006261FA969F68 +2025/08/19 06:00:03 [debug] 296457#296457: cleanup resolver +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA970A20 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA96B900 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA9568A0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA950870 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA94F7B0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA94E6F0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA94D630 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA945160 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA93C130, unused: 0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA9463E0, unused: 0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA951880, unused: 0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA9578B0, unused: 0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA95B8C0, unused: 0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA95F8D0, unused: 0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA9638E0, unused: 0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA9678F0, unused: 0 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA96CA10, unused: 4 +2025/08/19 06:00:03 [debug] 296457#296457: free: 00006261FA9722F0, unused: 16079 +2025/08/19 06:00:03 [debug] 331228#331228: bind() 0.0.0.0:9001 #5 +2025/08/19 06:00:03 [notice] 331228#331228: using the "epoll" event method +2025/08/19 06:00:03 [debug] 331228#331228: counter: 000072AACC2AD080, 1 +2025/08/19 06:00:03 [notice] 331228#331228: nginx/1.18.0 (Ubuntu) +2025/08/19 06:00:03 [notice] 331228#331228: OS: Linux 6.12.10-76061203-generic +2025/08/19 06:00:03 [notice] 331228#331228: getrlimit(RLIMIT_NOFILE): 1048576:1048576 +2025/08/19 06:00:03 [debug] 331229#331228: write: 6, 00007FFD9216AB50, 7, 0 +2025/08/19 06:00:03 [debug] 331229#331229: setproctitle: "nginx: master process nginx -p . -c config/local-nginx.conf" +2025/08/19 06:00:03 [notice] 331229#331229: start worker processes +2025/08/19 06:00:03 [debug] 331229#331229: channel 6:7 +2025/08/19 06:00:03 [notice] 331229#331229: start worker process 331230 +2025/08/19 06:00:03 [debug] 331229#331229: sigsuspend +2025/08/19 06:00:03 [debug] 331230#331230: add cleanup: 000062986E528A78 +2025/08/19 06:00:03 [debug] 331230#331230: malloc: 000062986E4EFBD0:8 +2025/08/19 06:00:03 [debug] 331230#331230: notify eventfd: 9 +2025/08/19 06:00:03 [debug] 331230#331230: testing the EPOLLRDHUP flag: success +2025/08/19 06:00:03 [debug] 331230#331230: malloc: 000062986E501170:6144 +2025/08/19 06:00:03 [debug] 331230#331230: malloc: 000072AACC0A5010:237568 +2025/08/19 06:00:03 [debug] 331230#331230: malloc: 000062986E52D080:98304 +2025/08/19 06:00:03 [debug] 331230#331230: malloc: 000062986E545090:98304 +2025/08/19 06:00:03 [debug] 331230#331230: epoll add event: fd:5 op:1 ev:00002001 +2025/08/19 06:00:03 [debug] 331230#331230: epoll add event: fd:7 op:1 ev:00002001 +2025/08/19 06:00:03 [debug] 331230#331230: setproctitle: "nginx: worker process" +2025/08/19 06:00:03 [debug] 331230#331230: worker cycle +2025/08/19 06:00:03 [debug] 331230#331230: epoll timer: -1 +2025/08/19 06:00:05 [debug] 331230#331230: epoll: fd:5 ev:0001 d:000072AACC0A5010 +2025/08/19 06:00:05 [debug] 331230#331230: accept on 0.0.0.0:9001, ready: 0 +2025/08/19 06:00:05 [debug] 331230#331230: posix_memalign: 000062986E4EE840:512 @16 +2025/08/19 06:00:05 [debug] 331230#331230: *1 accept: 127.0.0.1:48294 fd:6 +2025/08/19 06:00:05 [debug] 331230#331230: *1 event timer add: 6: 60000:164398929 +2025/08/19 06:00:05 [debug] 331230#331230: *1 reusable connection: 1 +2025/08/19 06:00:05 [debug] 331230#331230: *1 epoll add event: fd:6 op:1 ev:80002001 +2025/08/19 06:00:05 [debug] 331230#331230: timer delta: 1841 +2025/08/19 06:00:05 [debug] 331230#331230: worker cycle +2025/08/19 06:00:05 [debug] 331230#331230: epoll timer: 60000 +2025/08/19 06:00:05 [debug] 331230#331230: epoll: fd:6 ev:0001 d:000072AACC0A51E0 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http wait request handler +2025/08/19 06:00:05 [debug] 331230#331230: *1 malloc: 000062986E4F10A0:1024 +2025/08/19 06:00:05 [debug] 331230#331230: *1 recv: eof:0, avail:-1 +2025/08/19 06:00:05 [debug] 331230#331230: *1 recv: fd:6 856 of 1024 +2025/08/19 06:00:05 [debug] 331230#331230: *1 reusable connection: 0 +2025/08/19 06:00:05 [debug] 331230#331230: *1 posix_memalign: 000062986E50C610:4096 @16 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http process request line +2025/08/19 06:00:05 [debug] 331230#331230: *1 http request line: "GET /708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp HTTP/1.1" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http uri: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http args: "" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http exten: "webp" +2025/08/19 06:00:05 [debug] 331230#331230: *1 posix_memalign: 000062986E502980:4096 @16 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http process request header line +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Host: localhost:9001" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Connection: keep-alive" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Cache-Control: max-age=0" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "sec-ch-ua: "Not)A;Brand";v="8", "Chromium";v="138", "Brave";v="138"" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "sec-ch-ua-mobile: ?0" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "sec-ch-ua-platform: "Linux"" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Upgrade-Insecure-Requests: 1" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Sec-GPC: 1" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Accept-Language: en-US,en;q=0.7" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Sec-Fetch-Site: none" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Sec-Fetch-Mode: navigate" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Sec-Fetch-User: ?1" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Sec-Fetch-Dest: document" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Accept-Encoding: gzip, deflate, br, zstd" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "Cookie: _session=F9fhtKLJEDy-FOQnvLfoKCbvoOlPmSPR13KDiYmtQ--" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "If-None-Match: "68a3b183-31c6e"" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header: "If-Modified-Since: Mon, 18 Aug 2025 23:04:35 GMT" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http header done +2025/08/19 06:00:05 [debug] 331230#331230: *1 event timer del: 6: 164398929 +2025/08/19 06:00:05 [debug] 331230#331230: *1 generic phase: 0 +2025/08/19 06:00:05 [debug] 331230#331230: *1 rewrite phase: 1 +2025/08/19 06:00:05 [debug] 331230#331230: *1 test location: "/debug/list" +2025/08/19 06:00:05 [debug] 331230#331230: *1 test location: "/" +2025/08/19 06:00:05 [debug] 331230#331230: *1 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 06:00:05 [debug] 331230#331230: *1 using configuration "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http cl:-1 max:104857600 +2025/08/19 06:00:05 [debug] 331230#331230: *1 rewrite phase: 3 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script var +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script var: "GET" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script value: "HEAD" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script equal +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script equal: no +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script if +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script if: false +2025/08/19 06:00:05 [debug] 331230#331230: *1 post rewrite phase: 4 +2025/08/19 06:00:05 [debug] 331230#331230: *1 generic phase: 5 +2025/08/19 06:00:05 [debug] 331230#331230: *1 generic phase: 6 +2025/08/19 06:00:05 [debug] 331230#331230: *1 generic phase: 7 +2025/08/19 06:00:05 [debug] 331230#331230: *1 access phase: 8 +2025/08/19 06:00:05 [debug] 331230#331230: *1 access phase: 9 +2025/08/19 06:00:05 [debug] 331230#331230: *1 access phase: 10 +2025/08/19 06:00:05 [debug] 331230#331230: *1 post access phase: 11 +2025/08/19 06:00:05 [debug] 331230#331230: *1 generic phase: 12 +2025/08/19 06:00:05 [debug] 331230#331230: *1 try files handler +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script copy: "/" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script capture: "708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script copy: ".jpg" +2025/08/19 06:00:05 [debug] 331230#331230: *1 trying to use file: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.jpg" "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.jpg" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script copy: "/" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script capture: "708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script copy: ".jpeg" +2025/08/19 06:00:05 [debug] 331230#331230: *1 trying to use file: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.jpeg" "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.jpeg" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script copy: "/" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script capture: "708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script copy: ".png" +2025/08/19 06:00:05 [debug] 331230#331230: *1 trying to use file: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.png" "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.png" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script copy: "/" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script capture: "708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe" +2025/08/19 06:00:05 [debug] 331230#331230: *1 http script copy: ".webp" +2025/08/19 06:00:05 [debug] 331230#331230: *1 trying to use file: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" +2025/08/19 06:00:05 [debug] 331230#331230: *1 try file uri: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" +2025/08/19 06:00:05 [debug] 331230#331230: *1 generic phase: 13 +2025/08/19 06:00:05 [debug] 331230#331230: *1 content phase: 14 +2025/08/19 06:00:05 [debug] 331230#331230: *1 content phase: 15 +2025/08/19 06:00:05 [debug] 331230#331230: *1 content phase: 16 +2025/08/19 06:00:05 [debug] 331230#331230: *1 content phase: 17 +2025/08/19 06:00:05 [debug] 331230#331230: *1 content phase: 18 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http filename: "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" +2025/08/19 06:00:05 [debug] 331230#331230: *1 add cleanup: 000062986E502E10 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http static fd: 10 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http set discard body +2025/08/19 06:00:05 [debug] 331230#331230: *1 http ims:1755558275 lm:1755558275 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http im:""68a3b183-31c6e"" etag:"68a3b183-31c6e" +2025/08/19 06:00:05 [debug] 331230#331230: *1 HTTP/1.1 304 Not Modified +Server: nginx/1.18.0 (Ubuntu) +Date: Tue, 19 Aug 2025 10:00:05 GMT +Last-Modified: Mon, 18 Aug 2025 23:04:35 GMT +Connection: keep-alive +ETag: "68a3b183-31c6e" +Cache-Control: public, max-age=31536000, immutable +X-Content-Type-Options: nosniff +X-Frame-Options: DENY +X-XSS-Protection: 1; mode=block + +2025/08/19 06:00:05 [debug] 331230#331230: *1 write new buf t:1 f:0 000062986E502FF8, pos 000062986E502FF8, size: 332 file: 0, size: 0 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http write filter: l:1 f:0 s:332 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http write filter limit 0 +2025/08/19 06:00:05 [debug] 331230#331230: *1 writev: 332 of 332 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http write filter 0000000000000000 +2025/08/19 06:00:05 [debug] 331230#331230: *1 http finalize request: 0, "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp?" a:1, c:1 +2025/08/19 06:00:05 [debug] 331230#331230: *1 set http keepalive handler +2025/08/19 06:00:05 [debug] 331230#331230: *1 http close request +2025/08/19 06:00:05 [debug] 331230#331230: *1 http log handler +2025/08/19 06:00:05 [debug] 331230#331230: *1 run cleanup: 000062986E502E10 +2025/08/19 06:00:05 [debug] 331230#331230: *1 file cleanup: fd:10 +2025/08/19 06:00:05 [debug] 331230#331230: *1 free: 000062986E50C610, unused: 0 +2025/08/19 06:00:05 [debug] 331230#331230: *1 free: 000062986E502980, unused: 1809 +2025/08/19 06:00:05 [debug] 331230#331230: *1 free: 000062986E4F10A0 +2025/08/19 06:00:05 [debug] 331230#331230: *1 hc free: 0000000000000000 +2025/08/19 06:00:05 [debug] 331230#331230: *1 hc busy: 0000000000000000 0 +2025/08/19 06:00:05 [debug] 331230#331230: *1 tcp_nodelay +2025/08/19 06:00:05 [debug] 331230#331230: *1 reusable connection: 1 +2025/08/19 06:00:05 [debug] 331230#331230: *1 event timer add: 6: 65000:164403930 +2025/08/19 06:00:05 [debug] 331230#331230: timer delta: 1 +2025/08/19 06:00:05 [debug] 331230#331230: worker cycle +2025/08/19 06:00:05 [debug] 331230#331230: epoll timer: 65000 +2025/08/19 06:01:10 [debug] 331230#331230: timer delta: 65102 +2025/08/19 06:01:10 [debug] 331230#331230: *1 event timer del: 6: 164403930 +2025/08/19 06:01:10 [debug] 331230#331230: *1 http keepalive handler +2025/08/19 06:01:10 [debug] 331230#331230: *1 close http connection: 6 +2025/08/19 06:01:10 [debug] 331230#331230: *1 reusable connection: 0 +2025/08/19 06:01:10 [debug] 331230#331230: *1 free: 0000000000000000 +2025/08/19 06:01:10 [debug] 331230#331230: *1 free: 000062986E4EE840, unused: 136 +2025/08/19 06:01:10 [debug] 331230#331230: worker cycle +2025/08/19 06:01:10 [debug] 331230#331230: epoll timer: -1 +2025/08/19 07:49:21 [debug] 331230#331230: epoll: fd:5 ev:0001 d:000072AACC0A5010 +2025/08/19 07:49:21 [debug] 331230#331230: accept on 0.0.0.0:9001, ready: 0 +2025/08/19 07:49:21 [debug] 331230#331230: posix_memalign: 000062986E4EE840:512 @16 +2025/08/19 07:49:21 [debug] 331230#331230: *2 accept: 127.0.0.1:56540 fd:6 +2025/08/19 07:49:21 [debug] 331230#331230: *2 event timer add: 6: 60000:170954502 +2025/08/19 07:49:21 [debug] 331230#331230: *2 reusable connection: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *2 epoll add event: fd:6 op:1 ev:80002001 +2025/08/19 07:49:21 [debug] 331230#331230: timer delta: 6490470 +2025/08/19 07:49:21 [debug] 331230#331230: worker cycle +2025/08/19 07:49:21 [debug] 331230#331230: epoll timer: 60000 +2025/08/19 07:49:21 [debug] 331230#331230: epoll: fd:6 ev:0001 d:000072AACC0A51E1 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http wait request handler +2025/08/19 07:49:21 [debug] 331230#331230: *2 malloc: 000062986E4F10A0:1024 +2025/08/19 07:49:21 [debug] 331230#331230: *2 recv: eof:0, avail:-1 +2025/08/19 07:49:21 [debug] 331230#331230: *2 recv: fd:6 84 of 1024 +2025/08/19 07:49:21 [debug] 331230#331230: *2 reusable connection: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 posix_memalign: 000062986E50C610:4096 @16 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http process request line +2025/08/19 07:49:21 [debug] 331230#331230: *2 http request line: "GET /health HTTP/1.1" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http uri: "/health" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http args: "" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http exten: "" +2025/08/19 07:49:21 [debug] 331230#331230: *2 posix_memalign: 000062986E502980:4096 @16 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http process request header line +2025/08/19 07:49:21 [debug] 331230#331230: *2 http header: "Host: localhost:9001" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http header: "User-Agent: curl/8.15.0" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http header: "Accept: */*" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http header done +2025/08/19 07:49:21 [debug] 331230#331230: *2 event timer del: 6: 170954502 +2025/08/19 07:49:21 [debug] 331230#331230: *2 generic phase: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 rewrite phase: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *2 test location: "/debug/list" +2025/08/19 07:49:21 [debug] 331230#331230: *2 test location: "/health" +2025/08/19 07:49:21 [debug] 331230#331230: *2 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:49:21 [debug] 331230#331230: *2 test location: ~ "^/fcgi-head/([a-f0-9]{64}).*$" +2025/08/19 07:49:21 [debug] 331230#331230: *2 using configuration "/health" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http cl:-1 max:104857600 +2025/08/19 07:49:21 [debug] 331230#331230: *2 rewrite phase: 3 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http set discard body +2025/08/19 07:49:21 [debug] 331230#331230: *2 HTTP/1.1 200 OK +Server: nginx/1.18.0 (Ubuntu) +Date: Tue, 19 Aug 2025 11:49:21 GMT +Content-Type: application/octet-stream +Content-Length: 3 +Connection: keep-alive +Content-Type: text/plain + +2025/08/19 07:49:21 [debug] 331230#331230: *2 write new buf t:1 f:0 000062986E502D60, pos 000062986E502D60, size: 196 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http write filter: l:0 f:0 s:196 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http output filter "/health?" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http copy filter: "/health?" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http postpone filter "/health?" 00007FFD9216A6E0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 write old buf t:1 f:0 000062986E502D60, pos 000062986E502D60, size: 196 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 write new buf t:0 f:0 0000000000000000, pos 000062986E51DFAA, size: 3 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http write filter: l:1 f:0 s:199 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http write filter limit 0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 writev: 199 of 199 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http write filter 0000000000000000 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http copy filter: 0 "/health?" +2025/08/19 07:49:21 [debug] 331230#331230: *2 http finalize request: 0, "/health?" a:1, c:1 +2025/08/19 07:49:21 [debug] 331230#331230: *2 set http keepalive handler +2025/08/19 07:49:21 [debug] 331230#331230: *2 http close request +2025/08/19 07:49:21 [debug] 331230#331230: *2 http log handler +2025/08/19 07:49:21 [debug] 331230#331230: *2 free: 000062986E50C610, unused: 48 +2025/08/19 07:49:21 [debug] 331230#331230: *2 free: 000062986E502980, unused: 2752 +2025/08/19 07:49:21 [debug] 331230#331230: *2 free: 000062986E4F10A0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 hc free: 0000000000000000 +2025/08/19 07:49:21 [debug] 331230#331230: *2 hc busy: 0000000000000000 0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 tcp_nodelay +2025/08/19 07:49:21 [debug] 331230#331230: *2 reusable connection: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *2 event timer add: 6: 65000:170959502 +2025/08/19 07:49:21 [debug] 331230#331230: timer delta: 0 +2025/08/19 07:49:21 [debug] 331230#331230: worker cycle +2025/08/19 07:49:21 [debug] 331230#331230: epoll timer: 65000 +2025/08/19 07:49:21 [debug] 331230#331230: epoll: fd:6 ev:2001 d:000072AACC0A51E1 +2025/08/19 07:49:21 [debug] 331230#331230: *2 http keepalive handler +2025/08/19 07:49:21 [debug] 331230#331230: *2 malloc: 000062986E4F10A0:1024 +2025/08/19 07:49:21 [debug] 331230#331230: *2 recv: eof:1, avail:-1 +2025/08/19 07:49:21 [debug] 331230#331230: *2 recv: fd:6 0 of 1024 +2025/08/19 07:49:21 [info] 331230#331230: *2 client 127.0.0.1 closed keepalive connection +2025/08/19 07:49:21 [debug] 331230#331230: *2 close http connection: 6 +2025/08/19 07:49:21 [debug] 331230#331230: *2 event timer del: 6: 170959502 +2025/08/19 07:49:21 [debug] 331230#331230: *2 reusable connection: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 free: 000062986E4F10A0 +2025/08/19 07:49:21 [debug] 331230#331230: *2 free: 000062986E4EE840, unused: 136 +2025/08/19 07:49:21 [debug] 331230#331230: timer delta: 2 +2025/08/19 07:49:21 [debug] 331230#331230: worker cycle +2025/08/19 07:49:21 [debug] 331230#331230: epoll timer: -1 +2025/08/19 07:49:21 [debug] 331230#331230: epoll: fd:5 ev:0001 d:000072AACC0A5010 +2025/08/19 07:49:21 [debug] 331230#331230: accept on 0.0.0.0:9001, ready: 0 +2025/08/19 07:49:21 [debug] 331230#331230: posix_memalign: 000062986E4EE840:512 @16 +2025/08/19 07:49:21 [debug] 331230#331230: *3 accept: 127.0.0.1:56546 fd:6 +2025/08/19 07:49:21 [debug] 331230#331230: *3 event timer add: 6: 60000:170954741 +2025/08/19 07:49:21 [debug] 331230#331230: *3 reusable connection: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *3 epoll add event: fd:6 op:1 ev:80002001 +2025/08/19 07:49:21 [debug] 331230#331230: timer delta: 237 +2025/08/19 07:49:21 [debug] 331230#331230: worker cycle +2025/08/19 07:49:21 [debug] 331230#331230: epoll timer: 60000 +2025/08/19 07:49:21 [debug] 331230#331230: epoll: fd:6 ev:0001 d:000072AACC0A51E0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http wait request handler +2025/08/19 07:49:21 [debug] 331230#331230: *3 malloc: 000062986E4F10A0:1024 +2025/08/19 07:49:21 [debug] 331230#331230: *3 recv: eof:0, avail:-1 +2025/08/19 07:49:21 [debug] 331230#331230: *3 recv: fd:6 1024 of 1024 +2025/08/19 07:49:21 [debug] 331230#331230: *3 recv: avail:56 +2025/08/19 07:49:21 [debug] 331230#331230: *3 reusable connection: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 posix_memalign: 000062986E50C610:4096 @16 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http process request line +2025/08/19 07:49:21 [debug] 331230#331230: *3 http request line: "PUT /upload HTTP/1.1" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http uri: "/upload" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http args: "" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http exten: "" +2025/08/19 07:49:21 [debug] 331230#331230: *3 posix_memalign: 000062986E502980:4096 @16 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http process request header line +2025/08/19 07:49:21 [debug] 331230#331230: *3 http header: "Host: localhost:9001" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http header: "User-Agent: curl/8.15.0" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http header: "Accept: */*" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http header: "Authorization: Nostr eyJraW5kIjoyNDI0MiwiaWQiOiJjOWQzNmUwYWVhMWM1ODQyZTI1NmQ2NDA5NWZhMTQ4N2QwMDkyY2NiNjQxODc1MDM1MzI1Y2M4NjFjMTE2Y2NjIiwicHVia2V5IjoiNzliZTY2N2VmOWRjYmJhYzU1YTA2Mjk1Y2U4NzBiMDcwMjliZmNkYjJkY2UyOGQ5NTlmMjgxNWIxNmY4MTc5OCIsImNyZWF0ZWRfYXQiOjE3NTU2MDQxNjEsInRhZ3MiOltbInQiLCJ1cGxvYWQiXSxbIngiLCIyMWZjMzBkYWM0Yzk1YWQ0YjI2ZWI3OGQ5N2NiMzFhMGNiNGJjNjlmMzBjMGQ0MTk1Zjc2ODVhYzEzYjIyY2U2Il0sWyJleHBpcmF0aW9uIiwiMTc1NTYwNzc2MSJdXSwiY29udGVudCI6IiIsInNpZyI6IjhhZGVkOWJlMGUxOGVhOTA0YTE3MzUwOThkODUyMzFhN2E4ODBlYmE0MTVhYjFjYTI1M2NkZWFiOGFmNjdkOGY5Y2QyYWUwYjdmMDJlMmM3NGEzOWVhYjhmYzBkZjI5NGM0OTUwMWE5ZDJjOTM4OWIwYzI5ZDY2OTdmY2E3MGQ5In0=" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http header: "Content-Type: application/octet-stream" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http header: "Content-Length: 296" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http header done +2025/08/19 07:49:21 [debug] 331230#331230: *3 event timer del: 6: 170954741 +2025/08/19 07:49:21 [debug] 331230#331230: *3 generic phase: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 rewrite phase: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *3 test location: "/debug/list" +2025/08/19 07:49:21 [debug] 331230#331230: *3 test location: "/health" +2025/08/19 07:49:21 [debug] 331230#331230: *3 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:49:21 [debug] 331230#331230: *3 test location: ~ "^/fcgi-head/([a-f0-9]{64}).*$" +2025/08/19 07:49:21 [debug] 331230#331230: *3 using configuration "" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http cl:296 max:104857600 +2025/08/19 07:49:21 [debug] 331230#331230: *3 rewrite phase: 3 +2025/08/19 07:49:21 [debug] 331230#331230: *3 post rewrite phase: 4 +2025/08/19 07:49:21 [debug] 331230#331230: *3 generic phase: 5 +2025/08/19 07:49:21 [debug] 331230#331230: *3 generic phase: 6 +2025/08/19 07:49:21 [debug] 331230#331230: *3 generic phase: 7 +2025/08/19 07:49:21 [debug] 331230#331230: *3 access phase: 8 +2025/08/19 07:49:21 [debug] 331230#331230: *3 access phase: 9 +2025/08/19 07:49:21 [debug] 331230#331230: *3 access phase: 10 +2025/08/19 07:49:21 [debug] 331230#331230: *3 post access phase: 11 +2025/08/19 07:49:21 [debug] 331230#331230: *3 generic phase: 12 +2025/08/19 07:49:21 [debug] 331230#331230: *3 generic phase: 13 +2025/08/19 07:49:21 [debug] 331230#331230: *3 content phase: 14 +2025/08/19 07:49:21 [debug] 331230#331230: *3 content phase: 15 +2025/08/19 07:49:21 [debug] 331230#331230: *3 content phase: 16 +2025/08/19 07:49:21 [debug] 331230#331230: *3 content phase: 17 +2025/08/19 07:49:21 [debug] 331230#331230: *3 content phase: 18 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http finalize request: 405, "/upload?" a:1, c:1 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http special response: 405, "/upload?" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http set discard body +2025/08/19 07:49:21 [debug] 331230#331230: *3 http read discarded body +2025/08/19 07:49:21 [debug] 331230#331230: *3 recv: eof:0, avail:56 +2025/08/19 07:49:21 [debug] 331230#331230: *3 recv: fd:6 56 of 56 +2025/08/19 07:49:21 [debug] 331230#331230: *3 recv: avail:0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 HTTP/1.1 405 Not Allowed +Server: nginx/1.18.0 (Ubuntu) +Date: Tue, 19 Aug 2025 11:49:21 GMT +Content-Type: text/html +Content-Length: 166 +Connection: keep-alive + +2025/08/19 07:49:21 [debug] 331230#331230: *3 write new buf t:1 f:0 000062986E50D4A0, pos 000062986E50D4A0, size: 166 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http write filter: l:0 f:0 s:166 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http output filter "/upload?" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http copy filter: "/upload?" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http postpone filter "/upload?" 000062986E502DE8 +2025/08/19 07:49:21 [debug] 331230#331230: *3 write old buf t:1 f:0 000062986E50D4A0, pos 000062986E50D4A0, size: 166 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 write new buf t:0 f:0 0000000000000000, pos 000062986229C500, size: 104 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 write new buf t:0 f:0 0000000000000000, pos 000062986229CC80, size: 62 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http write filter: l:1 f:0 s:332 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http write filter limit 0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 writev: 332 of 332 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http write filter 0000000000000000 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http copy filter: 0 "/upload?" +2025/08/19 07:49:21 [debug] 331230#331230: *3 http finalize request: 0, "/upload?" a:1, c:1 +2025/08/19 07:49:21 [debug] 331230#331230: *3 set http keepalive handler +2025/08/19 07:49:21 [debug] 331230#331230: *3 http close request +2025/08/19 07:49:21 [debug] 331230#331230: *3 http log handler +2025/08/19 07:49:21 [debug] 331230#331230: *3 free: 000062986E50C610, unused: 8 +2025/08/19 07:49:21 [debug] 331230#331230: *3 free: 000062986E502980, unused: 2778 +2025/08/19 07:49:21 [debug] 331230#331230: *3 free: 000062986E4F10A0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 hc free: 0000000000000000 +2025/08/19 07:49:21 [debug] 331230#331230: *3 hc busy: 0000000000000000 0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 tcp_nodelay +2025/08/19 07:49:21 [debug] 331230#331230: *3 reusable connection: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *3 event timer add: 6: 65000:170959741 +2025/08/19 07:49:21 [debug] 331230#331230: *3 post event 000062986E52D140 +2025/08/19 07:49:21 [debug] 331230#331230: timer delta: 0 +2025/08/19 07:49:21 [debug] 331230#331230: posted event 000062986E52D140 +2025/08/19 07:49:21 [debug] 331230#331230: *3 delete posted event 000062986E52D140 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http keepalive handler +2025/08/19 07:49:21 [debug] 331230#331230: *3 malloc: 000062986E4F10A0:1024 +2025/08/19 07:49:21 [debug] 331230#331230: *3 recv: eof:0, avail:0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 free: 000062986E4F10A0 +2025/08/19 07:49:21 [debug] 331230#331230: worker cycle +2025/08/19 07:49:21 [debug] 331230#331230: epoll timer: 65000 +2025/08/19 07:49:21 [debug] 331230#331230: epoll: fd:6 ev:2001 d:000072AACC0A51E0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 http keepalive handler +2025/08/19 07:49:21 [debug] 331230#331230: *3 malloc: 000062986E4F10A0:1024 +2025/08/19 07:49:21 [debug] 331230#331230: *3 recv: eof:1, avail:-1 +2025/08/19 07:49:21 [debug] 331230#331230: *3 recv: fd:6 0 of 1024 +2025/08/19 07:49:21 [info] 331230#331230: *3 client 127.0.0.1 closed keepalive connection +2025/08/19 07:49:21 [debug] 331230#331230: *3 close http connection: 6 +2025/08/19 07:49:21 [debug] 331230#331230: *3 event timer del: 6: 170959741 +2025/08/19 07:49:21 [debug] 331230#331230: *3 reusable connection: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 free: 000062986E4F10A0 +2025/08/19 07:49:21 [debug] 331230#331230: *3 free: 000062986E4EE840, unused: 136 +2025/08/19 07:49:21 [debug] 331230#331230: timer delta: 1 +2025/08/19 07:49:21 [debug] 331230#331230: worker cycle +2025/08/19 07:49:21 [debug] 331230#331230: epoll timer: -1 +2025/08/19 07:49:21 [debug] 331230#331230: epoll: fd:5 ev:0001 d:000072AACC0A5010 +2025/08/19 07:49:21 [debug] 331230#331230: accept on 0.0.0.0:9001, ready: 0 +2025/08/19 07:49:21 [debug] 331230#331230: posix_memalign: 000062986E4EE840:512 @16 +2025/08/19 07:49:21 [debug] 331230#331230: *4 accept: 127.0.0.1:56556 fd:6 +2025/08/19 07:49:21 [debug] 331230#331230: *4 event timer add: 6: 60000:170954750 +2025/08/19 07:49:21 [debug] 331230#331230: *4 reusable connection: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *4 epoll add event: fd:6 op:1 ev:80002001 +2025/08/19 07:49:21 [debug] 331230#331230: timer delta: 8 +2025/08/19 07:49:21 [debug] 331230#331230: worker cycle +2025/08/19 07:49:21 [debug] 331230#331230: epoll timer: 60000 +2025/08/19 07:49:21 [debug] 331230#331230: epoll: fd:6 ev:0001 d:000072AACC0A51E1 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http wait request handler +2025/08/19 07:49:21 [debug] 331230#331230: *4 malloc: 000062986E4F10A0:1024 +2025/08/19 07:49:21 [debug] 331230#331230: *4 recv: eof:0, avail:-1 +2025/08/19 07:49:21 [debug] 331230#331230: *4 recv: fd:6 142 of 1024 +2025/08/19 07:49:21 [debug] 331230#331230: *4 reusable connection: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 posix_memalign: 000062986E50C610:4096 @16 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http process request line +2025/08/19 07:49:21 [debug] 331230#331230: *4 http request line: "GET /21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6 HTTP/1.1" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http uri: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http args: "" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http exten: "" +2025/08/19 07:49:21 [debug] 331230#331230: *4 posix_memalign: 000062986E502980:4096 @16 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http process request header line +2025/08/19 07:49:21 [debug] 331230#331230: *4 http header: "Host: localhost:9001" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http header: "User-Agent: curl/8.15.0" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http header: "Accept: */*" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http header done +2025/08/19 07:49:21 [debug] 331230#331230: *4 event timer del: 6: 170954750 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 rewrite phase: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *4 test location: "/debug/list" +2025/08/19 07:49:21 [debug] 331230#331230: *4 test location: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:49:21 [debug] 331230#331230: *4 using configuration "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http cl:-1 max:104857600 +2025/08/19 07:49:21 [debug] 331230#331230: *4 rewrite phase: 3 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script var +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script var: "GET" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script value: "HEAD" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script equal +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script equal: no +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script if +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script if: false +2025/08/19 07:49:21 [debug] 331230#331230: *4 post rewrite phase: 4 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 5 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 6 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 7 +2025/08/19 07:49:21 [debug] 331230#331230: *4 access phase: 8 +2025/08/19 07:49:21 [debug] 331230#331230: *4 access phase: 9 +2025/08/19 07:49:21 [debug] 331230#331230: *4 access phase: 10 +2025/08/19 07:49:21 [debug] 331230#331230: *4 post access phase: 11 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 12 +2025/08/19 07:49:21 [debug] 331230#331230: *4 try files handler +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".jpg" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.jpg" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.jpg" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".jpeg" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.jpeg" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.jpeg" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".png" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.png" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.png" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".webp" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.webp" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.webp" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".gif" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.gif" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.gif" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".pdf" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.pdf" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.pdf" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".mp4" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.mp4" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.mp4" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".mp3" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.mp3" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.mp3" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".txt" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.txt" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.txt" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script capture: "21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http script copy: ".md=404" +2025/08/19 07:49:21 [debug] 331230#331230: *4 trying to use file: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404" "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404" +2025/08/19 07:49:21 [debug] 331230#331230: *4 internal redirect: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404?" +2025/08/19 07:49:21 [debug] 331230#331230: *4 rewrite phase: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *4 test location: "/debug/list" +2025/08/19 07:49:21 [debug] 331230#331230: *4 test location: "/" +2025/08/19 07:49:21 [debug] 331230#331230: *4 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:49:21 [debug] 331230#331230: *4 test location: ~ "^/fcgi-head/([a-f0-9]{64}).*$" +2025/08/19 07:49:21 [debug] 331230#331230: *4 using configuration "" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http cl:-1 max:104857600 +2025/08/19 07:49:21 [debug] 331230#331230: *4 rewrite phase: 3 +2025/08/19 07:49:21 [debug] 331230#331230: *4 post rewrite phase: 4 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 5 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 6 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 7 +2025/08/19 07:49:21 [debug] 331230#331230: *4 access phase: 8 +2025/08/19 07:49:21 [debug] 331230#331230: *4 access phase: 9 +2025/08/19 07:49:21 [debug] 331230#331230: *4 access phase: 10 +2025/08/19 07:49:21 [debug] 331230#331230: *4 post access phase: 11 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 12 +2025/08/19 07:49:21 [debug] 331230#331230: *4 generic phase: 13 +2025/08/19 07:49:21 [debug] 331230#331230: *4 content phase: 14 +2025/08/19 07:49:21 [debug] 331230#331230: *4 content phase: 15 +2025/08/19 07:49:21 [debug] 331230#331230: *4 content phase: 16 +2025/08/19 07:49:21 [debug] 331230#331230: *4 content phase: 17 +2025/08/19 07:49:21 [debug] 331230#331230: *4 content phase: 18 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http filename: "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404" +2025/08/19 07:49:21 [debug] 331230#331230: *4 add cleanup: 000062986E50D5D0 +2025/08/19 07:49:21 [error] 331230#331230: *4 open() "./blobs/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6 HTTP/1.1", host: "localhost:9001" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http finalize request: 404, "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404?" a:1, c:2 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http special response: 404, "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404?" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http set discard body +2025/08/19 07:49:21 [debug] 331230#331230: *4 HTTP/1.1 404 Not Found +Server: nginx/1.18.0 (Ubuntu) +Date: Tue, 19 Aug 2025 11:49:21 GMT +Content-Type: text/html +Content-Length: 162 +Connection: keep-alive + +2025/08/19 07:49:21 [debug] 331230#331230: *4 write new buf t:1 f:0 000062986E502DB0, pos 000062986E502DB0, size: 164 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http write filter: l:0 f:0 s:164 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http output filter "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404?" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http copy filter: "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404?" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http postpone filter "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404?" 000062986E502F90 +2025/08/19 07:49:21 [debug] 331230#331230: *4 write old buf t:1 f:0 000062986E502DB0, pos 000062986E502DB0, size: 164 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 write new buf t:0 f:0 0000000000000000, pos 000062986229C580, size: 100 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 write new buf t:0 f:0 0000000000000000, pos 000062986229CC80, size: 62 file: 0, size: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http write filter: l:1 f:0 s:326 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http write filter limit 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 writev: 326 of 326 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http write filter 0000000000000000 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http copy filter: 0 "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404?" +2025/08/19 07:49:21 [debug] 331230#331230: *4 http finalize request: 0, "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404?" a:1, c:2 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http request count:2 blk:0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http finalize request: -4, "/21fc30dac4c95ad4b26eb78d97cb31a0cb4bc69f30c0d4195f7685ac13b22ce6.md=404?" a:1, c:1 +2025/08/19 07:49:21 [debug] 331230#331230: *4 set http keepalive handler +2025/08/19 07:49:21 [debug] 331230#331230: *4 http close request +2025/08/19 07:49:21 [debug] 331230#331230: *4 http log handler +2025/08/19 07:49:21 [debug] 331230#331230: *4 free: 000062986E50C610, unused: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 free: 000062986E502980, unused: 2296 +2025/08/19 07:49:21 [debug] 331230#331230: *4 free: 000062986E4F10A0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 hc free: 0000000000000000 +2025/08/19 07:49:21 [debug] 331230#331230: *4 hc busy: 0000000000000000 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 tcp_nodelay +2025/08/19 07:49:21 [debug] 331230#331230: *4 reusable connection: 1 +2025/08/19 07:49:21 [debug] 331230#331230: *4 event timer add: 6: 65000:170959750 +2025/08/19 07:49:21 [debug] 331230#331230: timer delta: 0 +2025/08/19 07:49:21 [debug] 331230#331230: worker cycle +2025/08/19 07:49:21 [debug] 331230#331230: epoll timer: 65000 +2025/08/19 07:49:21 [debug] 331230#331230: epoll: fd:6 ev:2001 d:000072AACC0A51E1 +2025/08/19 07:49:21 [debug] 331230#331230: *4 http keepalive handler +2025/08/19 07:49:21 [debug] 331230#331230: *4 malloc: 000062986E4F10A0:1024 +2025/08/19 07:49:21 [debug] 331230#331230: *4 recv: eof:1, avail:-1 +2025/08/19 07:49:21 [debug] 331230#331230: *4 recv: fd:6 0 of 1024 +2025/08/19 07:49:21 [info] 331230#331230: *4 client 127.0.0.1 closed keepalive connection +2025/08/19 07:49:21 [debug] 331230#331230: *4 close http connection: 6 +2025/08/19 07:49:21 [debug] 331230#331230: *4 event timer del: 6: 170959750 +2025/08/19 07:49:21 [debug] 331230#331230: *4 reusable connection: 0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 free: 000062986E4F10A0 +2025/08/19 07:49:21 [debug] 331230#331230: *4 free: 000062986E4EE840, unused: 136 +2025/08/19 07:49:21 [debug] 331230#331230: timer delta: 1 +2025/08/19 07:49:21 [debug] 331230#331230: worker cycle +2025/08/19 07:49:21 [debug] 331230#331230: epoll timer: -1 +2025/08/19 07:51:54 [debug] 331230#331230: epoll: fd:5 ev:0001 d:000072AACC0A5010 +2025/08/19 07:51:54 [debug] 331230#331230: accept on 0.0.0.0:9001, ready: 0 +2025/08/19 07:51:54 [debug] 331230#331230: posix_memalign: 000062986E4EE840:512 @16 +2025/08/19 07:51:54 [debug] 331230#331230: *5 accept: 127.0.0.1:52650 fd:6 +2025/08/19 07:51:54 [debug] 331230#331230: *5 event timer add: 6: 60000:171107196 +2025/08/19 07:51:54 [debug] 331230#331230: *5 reusable connection: 1 +2025/08/19 07:51:54 [debug] 331230#331230: *5 epoll add event: fd:6 op:1 ev:80002001 +2025/08/19 07:51:54 [debug] 331230#331230: timer delta: 152445 +2025/08/19 07:51:54 [debug] 331230#331230: worker cycle +2025/08/19 07:51:54 [debug] 331230#331230: epoll timer: 60000 +2025/08/19 07:51:54 [debug] 331230#331230: epoll: fd:6 ev:0001 d:000072AACC0A51E0 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http wait request handler +2025/08/19 07:51:54 [debug] 331230#331230: *5 malloc: 000062986E4F10A0:1024 +2025/08/19 07:51:54 [debug] 331230#331230: *5 recv: eof:0, avail:-1 +2025/08/19 07:51:54 [debug] 331230#331230: *5 recv: fd:6 856 of 1024 +2025/08/19 07:51:54 [debug] 331230#331230: *5 reusable connection: 0 +2025/08/19 07:51:54 [debug] 331230#331230: *5 posix_memalign: 000062986E50C610:4096 @16 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http process request line +2025/08/19 07:51:54 [debug] 331230#331230: *5 http request line: "GET /708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp HTTP/1.1" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http uri: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http args: "" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http exten: "webp" +2025/08/19 07:51:54 [debug] 331230#331230: *5 posix_memalign: 000062986E502980:4096 @16 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http process request header line +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Host: localhost:9001" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Connection: keep-alive" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Cache-Control: max-age=0" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "sec-ch-ua: "Not)A;Brand";v="8", "Chromium";v="138", "Brave";v="138"" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "sec-ch-ua-mobile: ?0" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "sec-ch-ua-platform: "Linux"" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Upgrade-Insecure-Requests: 1" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Sec-GPC: 1" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Accept-Language: en-US,en;q=0.7" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Sec-Fetch-Site: none" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Sec-Fetch-Mode: navigate" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Sec-Fetch-User: ?1" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Sec-Fetch-Dest: document" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Accept-Encoding: gzip, deflate, br, zstd" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "Cookie: _session=F9fhtKLJEDy-FOQnvLfoKCbvoOlPmSPR13KDiYmtQ--" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "If-None-Match: "68a3b183-31c6e"" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header: "If-Modified-Since: Mon, 18 Aug 2025 23:04:35 GMT" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http header done +2025/08/19 07:51:54 [debug] 331230#331230: *5 event timer del: 6: 171107196 +2025/08/19 07:51:54 [debug] 331230#331230: *5 generic phase: 0 +2025/08/19 07:51:54 [debug] 331230#331230: *5 rewrite phase: 1 +2025/08/19 07:51:54 [debug] 331230#331230: *5 test location: "/debug/list" +2025/08/19 07:51:54 [debug] 331230#331230: *5 test location: "/" +2025/08/19 07:51:54 [debug] 331230#331230: *5 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:51:54 [debug] 331230#331230: *5 using configuration "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http cl:-1 max:104857600 +2025/08/19 07:51:54 [debug] 331230#331230: *5 rewrite phase: 3 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script var +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script var: "GET" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script value: "HEAD" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script equal +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script equal: no +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script if +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script if: false +2025/08/19 07:51:54 [debug] 331230#331230: *5 post rewrite phase: 4 +2025/08/19 07:51:54 [debug] 331230#331230: *5 generic phase: 5 +2025/08/19 07:51:54 [debug] 331230#331230: *5 generic phase: 6 +2025/08/19 07:51:54 [debug] 331230#331230: *5 generic phase: 7 +2025/08/19 07:51:54 [debug] 331230#331230: *5 access phase: 8 +2025/08/19 07:51:54 [debug] 331230#331230: *5 access phase: 9 +2025/08/19 07:51:54 [debug] 331230#331230: *5 access phase: 10 +2025/08/19 07:51:54 [debug] 331230#331230: *5 post access phase: 11 +2025/08/19 07:51:54 [debug] 331230#331230: *5 generic phase: 12 +2025/08/19 07:51:54 [debug] 331230#331230: *5 try files handler +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script copy: "/" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script capture: "708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script copy: ".jpg" +2025/08/19 07:51:54 [debug] 331230#331230: *5 trying to use file: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.jpg" "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.jpg" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script copy: "/" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script capture: "708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script copy: ".jpeg" +2025/08/19 07:51:54 [debug] 331230#331230: *5 trying to use file: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.jpeg" "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.jpeg" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script copy: "/" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script capture: "708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script copy: ".png" +2025/08/19 07:51:54 [debug] 331230#331230: *5 trying to use file: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.png" "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.png" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script copy: "/" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script capture: "708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe" +2025/08/19 07:51:54 [debug] 331230#331230: *5 http script copy: ".webp" +2025/08/19 07:51:54 [debug] 331230#331230: *5 trying to use file: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" +2025/08/19 07:51:54 [debug] 331230#331230: *5 try file uri: "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" +2025/08/19 07:51:54 [debug] 331230#331230: *5 generic phase: 13 +2025/08/19 07:51:54 [debug] 331230#331230: *5 content phase: 14 +2025/08/19 07:51:54 [debug] 331230#331230: *5 content phase: 15 +2025/08/19 07:51:54 [debug] 331230#331230: *5 content phase: 16 +2025/08/19 07:51:54 [debug] 331230#331230: *5 content phase: 17 +2025/08/19 07:51:54 [debug] 331230#331230: *5 content phase: 18 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http filename: "./blobs/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp" +2025/08/19 07:51:54 [debug] 331230#331230: *5 add cleanup: 000062986E502E10 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http static fd: 10 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http set discard body +2025/08/19 07:51:54 [debug] 331230#331230: *5 http ims:1755558275 lm:1755558275 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http im:""68a3b183-31c6e"" etag:"68a3b183-31c6e" +2025/08/19 07:51:54 [debug] 331230#331230: *5 HTTP/1.1 304 Not Modified +Server: nginx/1.18.0 (Ubuntu) +Date: Tue, 19 Aug 2025 11:51:54 GMT +Last-Modified: Mon, 18 Aug 2025 23:04:35 GMT +Connection: keep-alive +ETag: "68a3b183-31c6e" +Cache-Control: public, max-age=31536000, immutable +X-Content-Type-Options: nosniff +X-Frame-Options: DENY +X-XSS-Protection: 1; mode=block + +2025/08/19 07:51:54 [debug] 331230#331230: *5 write new buf t:1 f:0 000062986E502FF8, pos 000062986E502FF8, size: 332 file: 0, size: 0 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http write filter: l:1 f:0 s:332 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http write filter limit 0 +2025/08/19 07:51:54 [debug] 331230#331230: *5 writev: 332 of 332 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http write filter 0000000000000000 +2025/08/19 07:51:54 [debug] 331230#331230: *5 http finalize request: 0, "/708d0e8226ec17b0585417c0ec9352ce5f52c3820c904b7066fe20b00f2d9cfe.webp?" a:1, c:1 +2025/08/19 07:51:54 [debug] 331230#331230: *5 set http keepalive handler +2025/08/19 07:51:54 [debug] 331230#331230: *5 http close request +2025/08/19 07:51:54 [debug] 331230#331230: *5 http log handler +2025/08/19 07:51:54 [debug] 331230#331230: *5 run cleanup: 000062986E502E10 +2025/08/19 07:51:54 [debug] 331230#331230: *5 file cleanup: fd:10 +2025/08/19 07:51:54 [debug] 331230#331230: *5 free: 000062986E50C610, unused: 0 +2025/08/19 07:51:54 [debug] 331230#331230: *5 free: 000062986E502980, unused: 1809 +2025/08/19 07:51:54 [debug] 331230#331230: *5 free: 000062986E4F10A0 +2025/08/19 07:51:54 [debug] 331230#331230: *5 hc free: 0000000000000000 +2025/08/19 07:51:54 [debug] 331230#331230: *5 hc busy: 0000000000000000 0 +2025/08/19 07:51:54 [debug] 331230#331230: *5 tcp_nodelay +2025/08/19 07:51:54 [debug] 331230#331230: *5 reusable connection: 1 +2025/08/19 07:51:54 [debug] 331230#331230: *5 event timer add: 6: 65000:171112196 +2025/08/19 07:51:54 [debug] 331230#331230: timer delta: 0 +2025/08/19 07:51:54 [debug] 331230#331230: worker cycle +2025/08/19 07:51:54 [debug] 331230#331230: epoll timer: 65000 +2025/08/19 07:52:52 [notice] 331230#331230: signal 15 (SIGTERM) received from 348604, exiting +2025/08/19 07:52:52 [notice] 331229#331229: signal 15 (SIGTERM) received from 348604, exiting +2025/08/19 07:52:52 [info] 331230#331230: epoll_wait() failed (4: Interrupted system call) +2025/08/19 07:52:52 [debug] 331230#331230: timer delta: 58582 +2025/08/19 07:52:52 [notice] 331230#331230: exiting +2025/08/19 07:52:52 [debug] 331230#331230: flush files +2025/08/19 07:52:52 [debug] 331229#331229: wake up, sigio 0 +2025/08/19 07:52:52 [debug] 331230#331230: run cleanup: 000062986E528A78 +2025/08/19 07:52:52 [debug] 331229#331229: child: 0 331230 e:0 t:0 d:0 r:1 j:0 +2025/08/19 07:52:52 [debug] 331230#331230: run cleanup: 000062986E521E80 +2025/08/19 07:52:52 [debug] 331230#331230: cleanup resolver +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E52B7B0 +2025/08/19 07:52:52 [debug] 331229#331229: termination cycle: 50 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E522680 +2025/08/19 07:52:52 [debug] 331229#331229: sigsuspend +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E511630 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E50B600 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E506530 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E505470 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E5043B0 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E4F4130, unused: 0 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E4FD160, unused: 0 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E5075F0, unused: 0 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E50D620, unused: 0 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E512640, unused: 0 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E516650, unused: 0 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E51A660, unused: 0 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E51E670, unused: 0 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E523790, unused: 8 +2025/08/19 07:52:52 [debug] 331230#331230: free: 000062986E5277A0, unused: 11536 +2025/08/19 07:52:52 [notice] 331230#331230: exit +2025/08/19 07:52:52 [notice] 331229#331229: signal 17 (SIGCHLD) received from 331230 +2025/08/19 07:52:52 [notice] 331229#331229: worker process 331230 exited with code 0 +2025/08/19 07:52:52 [debug] 331229#331229: shmtx forced unlock +2025/08/19 07:52:52 [debug] 331229#331229: wake up, sigio 3 +2025/08/19 07:52:52 [debug] 331229#331229: reap children +2025/08/19 07:52:52 [debug] 331229#331229: child: 0 331230 e:1 t:1 d:0 r:1 j:0 +2025/08/19 07:52:52 [notice] 331229#331229: exit +2025/08/19 07:52:52 [debug] 331229#331229: close listening 0.0.0.0:9001 #5 +2025/08/19 07:52:52 [debug] 331229#331229: run cleanup: 000062986E521E80 +2025/08/19 07:52:52 [debug] 331229#331229: cleanup resolver +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E52B7B0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E522680 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E511630 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E50B600 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E506530 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E505470 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E5043B0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E4F4130, unused: 0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E4FD160, unused: 0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E5075F0, unused: 0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E50D620, unused: 0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E512640, unused: 0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E516650, unused: 0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E51A660, unused: 0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E51E670, unused: 0 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E523790, unused: 8 +2025/08/19 07:52:52 [debug] 331229#331229: free: 000062986E5277A0, unused: 11567 +2025/08/19 07:57:39 [debug] 349769#349769: bind() 0.0.0.0:9001 #5 +2025/08/19 07:57:39 [notice] 349769#349769: using the "epoll" event method +2025/08/19 07:57:39 [debug] 349769#349769: counter: 000075EA428D9080, 1 +2025/08/19 07:57:39 [notice] 349769#349769: nginx/1.18.0 (Ubuntu) +2025/08/19 07:57:39 [notice] 349769#349769: OS: Linux 6.12.10-76061203-generic +2025/08/19 07:57:39 [notice] 349769#349769: getrlimit(RLIMIT_NOFILE): 1048576:1048576 +2025/08/19 07:57:39 [debug] 349770#349769: write: 6, 00007FFDD38FD630, 7, 0 +2025/08/19 07:57:39 [debug] 349770#349770: setproctitle: "nginx: master process nginx -p . -c config/local-nginx.conf" +2025/08/19 07:57:39 [notice] 349770#349770: start worker processes +2025/08/19 07:57:39 [debug] 349770#349770: channel 6:7 +2025/08/19 07:57:39 [notice] 349770#349770: start worker process 349771 +2025/08/19 07:57:39 [debug] 349770#349770: sigsuspend +2025/08/19 07:57:39 [debug] 349771#349771: add cleanup: 00005CE043647A48 +2025/08/19 07:57:39 [debug] 349771#349771: malloc: 00005CE043607BD0:8 +2025/08/19 07:57:39 [debug] 349771#349771: notify eventfd: 9 +2025/08/19 07:57:39 [debug] 349771#349771: testing the EPOLLRDHUP flag: success +2025/08/19 07:57:39 [debug] 349771#349771: malloc: 00005CE043619170:6144 +2025/08/19 07:57:39 [debug] 349771#349771: malloc: 000075EA426D1010:237568 +2025/08/19 07:57:39 [debug] 349771#349771: malloc: 00005CE04364A260:98304 +2025/08/19 07:57:39 [debug] 349771#349771: malloc: 00005CE043662270:98304 +2025/08/19 07:57:39 [debug] 349771#349771: epoll add event: fd:5 op:1 ev:00002001 +2025/08/19 07:57:39 [debug] 349771#349771: epoll add event: fd:7 op:1 ev:00002001 +2025/08/19 07:57:39 [debug] 349771#349771: setproctitle: "nginx: worker process" +2025/08/19 07:57:39 [debug] 349771#349771: worker cycle +2025/08/19 07:57:39 [debug] 349771#349771: epoll timer: -1 +2025/08/19 07:57:47 [debug] 349771#349771: epoll: fd:5 ev:0001 d:000075EA426D1010 +2025/08/19 07:57:47 [debug] 349771#349771: accept on 0.0.0.0:9001, ready: 0 +2025/08/19 07:57:47 [debug] 349771#349771: posix_memalign: 00005CE043606840:512 @16 +2025/08/19 07:57:47 [debug] 349771#349771: *1 accept: 127.0.0.1:52854 fd:6 +2025/08/19 07:57:47 [debug] 349771#349771: *1 event timer add: 6: 60000:171460950 +2025/08/19 07:57:47 [debug] 349771#349771: *1 reusable connection: 1 +2025/08/19 07:57:47 [debug] 349771#349771: *1 epoll add event: fd:6 op:1 ev:80002001 +2025/08/19 07:57:47 [debug] 349771#349771: timer delta: 8409 +2025/08/19 07:57:47 [debug] 349771#349771: worker cycle +2025/08/19 07:57:47 [debug] 349771#349771: epoll timer: 60000 +2025/08/19 07:57:47 [debug] 349771#349771: epoll: fd:6 ev:0001 d:000075EA426D11E0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http wait request handler +2025/08/19 07:57:47 [debug] 349771#349771: *1 malloc: 00005CE0436090A0:1024 +2025/08/19 07:57:47 [debug] 349771#349771: *1 recv: eof:0, avail:-1 +2025/08/19 07:57:47 [debug] 349771#349771: *1 recv: fd:6 84 of 1024 +2025/08/19 07:57:47 [debug] 349771#349771: *1 reusable connection: 0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 posix_memalign: 00005CE043624610:4096 @16 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http process request line +2025/08/19 07:57:47 [debug] 349771#349771: *1 http request line: "GET /health HTTP/1.1" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http uri: "/health" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http args: "" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http exten: "" +2025/08/19 07:57:47 [debug] 349771#349771: *1 posix_memalign: 00005CE04361A980:4096 @16 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http process request header line +2025/08/19 07:57:47 [debug] 349771#349771: *1 http header: "Host: localhost:9001" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http header: "User-Agent: curl/8.15.0" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http header: "Accept: */*" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http header done +2025/08/19 07:57:47 [debug] 349771#349771: *1 event timer del: 6: 171460950 +2025/08/19 07:57:47 [debug] 349771#349771: *1 generic phase: 0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 rewrite phase: 1 +2025/08/19 07:57:47 [debug] 349771#349771: *1 test location: "/health" +2025/08/19 07:57:47 [debug] 349771#349771: *1 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:57:47 [debug] 349771#349771: *1 test location: ~ "^/fcgi-head/([a-f0-9]{64}).*$" +2025/08/19 07:57:47 [debug] 349771#349771: *1 using configuration "/health" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http cl:-1 max:104857600 +2025/08/19 07:57:47 [debug] 349771#349771: *1 rewrite phase: 3 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http set discard body +2025/08/19 07:57:47 [debug] 349771#349771: *1 HTTP/1.1 200 OK +Server: nginx/1.18.0 (Ubuntu) +Date: Tue, 19 Aug 2025 11:57:47 GMT +Content-Type: application/octet-stream +Content-Length: 3 +Connection: keep-alive +Content-Type: text/plain + +2025/08/19 07:57:47 [debug] 349771#349771: *1 write new buf t:1 f:0 00005CE04361AD60, pos 00005CE04361AD60, size: 196 file: 0, size: 0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http write filter: l:0 f:0 s:196 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http output filter "/health?" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http copy filter: "/health?" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http postpone filter "/health?" 00007FFDD38FD1C0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 write old buf t:1 f:0 00005CE04361AD60, pos 00005CE04361AD60, size: 196 file: 0, size: 0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 write new buf t:0 f:0 0000000000000000, pos 00005CE04363AD7A, size: 3 file: 0, size: 0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http write filter: l:1 f:0 s:199 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http write filter limit 0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 writev: 199 of 199 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http write filter 0000000000000000 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http copy filter: 0 "/health?" +2025/08/19 07:57:47 [debug] 349771#349771: *1 http finalize request: 0, "/health?" a:1, c:1 +2025/08/19 07:57:47 [debug] 349771#349771: *1 set http keepalive handler +2025/08/19 07:57:47 [debug] 349771#349771: *1 http close request +2025/08/19 07:57:47 [debug] 349771#349771: *1 http log handler +2025/08/19 07:57:47 [debug] 349771#349771: *1 free: 00005CE043624610, unused: 0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 free: 00005CE04361A980, unused: 2736 +2025/08/19 07:57:47 [debug] 349771#349771: *1 free: 00005CE0436090A0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 hc free: 0000000000000000 +2025/08/19 07:57:47 [debug] 349771#349771: *1 hc busy: 0000000000000000 0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 tcp_nodelay +2025/08/19 07:57:47 [debug] 349771#349771: *1 reusable connection: 1 +2025/08/19 07:57:47 [debug] 349771#349771: *1 event timer add: 6: 65000:171465951 +2025/08/19 07:57:47 [debug] 349771#349771: timer delta: 1 +2025/08/19 07:57:47 [debug] 349771#349771: worker cycle +2025/08/19 07:57:47 [debug] 349771#349771: epoll timer: 65000 +2025/08/19 07:57:47 [debug] 349771#349771: epoll: fd:6 ev:2001 d:000075EA426D11E0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 http keepalive handler +2025/08/19 07:57:47 [debug] 349771#349771: *1 malloc: 00005CE0436090A0:1024 +2025/08/19 07:57:47 [debug] 349771#349771: *1 recv: eof:1, avail:-1 +2025/08/19 07:57:47 [debug] 349771#349771: *1 recv: fd:6 0 of 1024 +2025/08/19 07:57:47 [info] 349771#349771: *1 client 127.0.0.1 closed keepalive connection +2025/08/19 07:57:47 [debug] 349771#349771: *1 close http connection: 6 +2025/08/19 07:57:47 [debug] 349771#349771: *1 event timer del: 6: 171465951 +2025/08/19 07:57:47 [debug] 349771#349771: *1 reusable connection: 0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 free: 00005CE0436090A0 +2025/08/19 07:57:47 [debug] 349771#349771: *1 free: 00005CE043606840, unused: 136 +2025/08/19 07:57:47 [debug] 349771#349771: timer delta: 1 +2025/08/19 07:57:47 [debug] 349771#349771: worker cycle +2025/08/19 07:57:47 [debug] 349771#349771: epoll timer: -1 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:5 ev:0001 d:000075EA426D1010 +2025/08/19 07:57:54 [debug] 349771#349771: accept on 0.0.0.0:9001, ready: 0 +2025/08/19 07:57:54 [debug] 349771#349771: posix_memalign: 00005CE043606840:512 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *2 accept: 127.0.0.1:33320 fd:6 +2025/08/19 07:57:54 [debug] 349771#349771: *2 event timer add: 6: 60000:171467745 +2025/08/19 07:57:54 [debug] 349771#349771: *2 reusable connection: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *2 epoll add event: fd:6 op:1 ev:80002001 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 6793 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: 60000 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:6 ev:0001 d:000075EA426D11E1 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http wait request handler +2025/08/19 07:57:54 [debug] 349771#349771: *2 malloc: 00005CE0436090A0:1024 +2025/08/19 07:57:54 [debug] 349771#349771: *2 recv: eof:0, avail:-1 +2025/08/19 07:57:54 [debug] 349771#349771: *2 recv: fd:6 84 of 1024 +2025/08/19 07:57:54 [debug] 349771#349771: *2 reusable connection: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 posix_memalign: 00005CE043624610:4096 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http process request line +2025/08/19 07:57:54 [debug] 349771#349771: *2 http request line: "GET /health HTTP/1.1" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http uri: "/health" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http args: "" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http exten: "" +2025/08/19 07:57:54 [debug] 349771#349771: *2 posix_memalign: 00005CE04361A980:4096 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http process request header line +2025/08/19 07:57:54 [debug] 349771#349771: *2 http header: "Host: localhost:9001" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http header: "User-Agent: curl/8.15.0" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http header: "Accept: */*" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http header done +2025/08/19 07:57:54 [debug] 349771#349771: *2 event timer del: 6: 171467745 +2025/08/19 07:57:54 [debug] 349771#349771: *2 generic phase: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 rewrite phase: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *2 test location: "/health" +2025/08/19 07:57:54 [debug] 349771#349771: *2 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:57:54 [debug] 349771#349771: *2 test location: ~ "^/fcgi-head/([a-f0-9]{64}).*$" +2025/08/19 07:57:54 [debug] 349771#349771: *2 using configuration "/health" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http cl:-1 max:104857600 +2025/08/19 07:57:54 [debug] 349771#349771: *2 rewrite phase: 3 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http set discard body +2025/08/19 07:57:54 [debug] 349771#349771: *2 HTTP/1.1 200 OK +Server: nginx/1.18.0 (Ubuntu) +Date: Tue, 19 Aug 2025 11:57:54 GMT +Content-Type: application/octet-stream +Content-Length: 3 +Connection: keep-alive +Content-Type: text/plain + +2025/08/19 07:57:54 [debug] 349771#349771: *2 write new buf t:1 f:0 00005CE04361AD60, pos 00005CE04361AD60, size: 196 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http write filter: l:0 f:0 s:196 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http output filter "/health?" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http copy filter: "/health?" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http postpone filter "/health?" 00007FFDD38FD1C0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 write old buf t:1 f:0 00005CE04361AD60, pos 00005CE04361AD60, size: 196 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 write new buf t:0 f:0 0000000000000000, pos 00005CE04363AD7A, size: 3 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http write filter: l:1 f:0 s:199 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http write filter limit 0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 writev: 199 of 199 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http write filter 0000000000000000 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http copy filter: 0 "/health?" +2025/08/19 07:57:54 [debug] 349771#349771: *2 http finalize request: 0, "/health?" a:1, c:1 +2025/08/19 07:57:54 [debug] 349771#349771: *2 set http keepalive handler +2025/08/19 07:57:54 [debug] 349771#349771: *2 http close request +2025/08/19 07:57:54 [debug] 349771#349771: *2 http log handler +2025/08/19 07:57:54 [debug] 349771#349771: *2 free: 00005CE043624610, unused: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 free: 00005CE04361A980, unused: 2736 +2025/08/19 07:57:54 [debug] 349771#349771: *2 free: 00005CE0436090A0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 hc free: 0000000000000000 +2025/08/19 07:57:54 [debug] 349771#349771: *2 hc busy: 0000000000000000 0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 tcp_nodelay +2025/08/19 07:57:54 [debug] 349771#349771: *2 reusable connection: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *2 event timer add: 6: 65000:171472746 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 1 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: 65000 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:6 ev:2001 d:000075EA426D11E1 +2025/08/19 07:57:54 [debug] 349771#349771: *2 http keepalive handler +2025/08/19 07:57:54 [debug] 349771#349771: *2 malloc: 00005CE0436090A0:1024 +2025/08/19 07:57:54 [debug] 349771#349771: *2 recv: eof:1, avail:-1 +2025/08/19 07:57:54 [debug] 349771#349771: *2 recv: fd:6 0 of 1024 +2025/08/19 07:57:54 [info] 349771#349771: *2 client 127.0.0.1 closed keepalive connection +2025/08/19 07:57:54 [debug] 349771#349771: *2 close http connection: 6 +2025/08/19 07:57:54 [debug] 349771#349771: *2 event timer del: 6: 171472746 +2025/08/19 07:57:54 [debug] 349771#349771: *2 reusable connection: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 free: 00005CE0436090A0 +2025/08/19 07:57:54 [debug] 349771#349771: *2 free: 00005CE043606840, unused: 136 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 1 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: -1 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:5 ev:0001 d:000075EA426D1010 +2025/08/19 07:57:54 [debug] 349771#349771: accept on 0.0.0.0:9001, ready: 0 +2025/08/19 07:57:54 [debug] 349771#349771: posix_memalign: 00005CE043606840:512 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *3 accept: 127.0.0.1:33322 fd:6 +2025/08/19 07:57:54 [debug] 349771#349771: *3 event timer add: 6: 60000:171468057 +2025/08/19 07:57:54 [debug] 349771#349771: *3 reusable connection: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 epoll add event: fd:6 op:1 ev:80002001 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 310 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: 60000 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:6 ev:0001 d:000075EA426D11E0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http wait request handler +2025/08/19 07:57:54 [debug] 349771#349771: *3 malloc: 00005CE0436090A0:1024 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: eof:0, avail:-1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: fd:6 1024 of 1024 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: avail:56 +2025/08/19 07:57:54 [debug] 349771#349771: *3 reusable connection: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 posix_memalign: 00005CE043624610:4096 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http process request line +2025/08/19 07:57:54 [debug] 349771#349771: *3 http request line: "PUT /upload HTTP/1.1" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http uri: "/upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http args: "" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http exten: "" +2025/08/19 07:57:54 [debug] 349771#349771: *3 posix_memalign: 00005CE04361A980:4096 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http process request header line +2025/08/19 07:57:54 [debug] 349771#349771: *3 http header: "Host: localhost:9001" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http header: "User-Agent: curl/8.15.0" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http header: "Accept: */*" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http header: "Authorization: Nostr eyJraW5kIjoyNDI0MiwiaWQiOiIwNDZiN2E3MDBjZTAzZjQ0NGFhYmNkY2Y1NGVlOGM5ZGNhZmJhODhkY2IzNzM2NzYwODFkMDkyOTZkMDU5NGZmIiwicHVia2V5IjoiNzliZTY2N2VmOWRjYmJhYzU1YTA2Mjk1Y2U4NzBiMDcwMjliZmNkYjJkY2UyOGQ5NTlmMjgxNWIxNmY4MTc5OCIsImNyZWF0ZWRfYXQiOjE3NTU2MDQ2NzQsInRhZ3MiOltbInQiLCJ1cGxvYWQiXSxbIngiLCJhZTlmNTljN2FjMzg2YjdmZTYzNDNkNjY5ZmMyN2YzN2Q3YjY2MjU2ODI0YmU2NTVkMjlhMjU2OTA4ZjE1NGU5Il0sWyJleHBpcmF0aW9uIiwiMTc1NTYwODI3NCJdXSwiY29udGVudCI6IiIsInNpZyI6ImZlNzBiMDU4NTM1YjM1ZTFjNzY1NDkyNmFiMDczZTdlNzZhZTgyZjQ1N2RmOWZhYzRiNTFlZTkzMmQ1Mzg2NzM3NWE2NGM0NThmZDBkNGM0MjgyMGIxZDI4ZWQzNTZiMzkzMDQ5MzU5YTEyNWM5NGY4MzNlZjUyYjFlNmRkZGM5In0=" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http header: "Content-Type: application/octet-stream" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http header: "Content-Length: 296" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http header done +2025/08/19 07:57:54 [debug] 349771#349771: *3 event timer del: 6: 171468057 +2025/08/19 07:57:54 [debug] 349771#349771: *3 generic phase: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 rewrite phase: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 test location: "/health" +2025/08/19 07:57:54 [debug] 349771#349771: *3 test location: "/upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:57:54 [debug] 349771#349771: *3 test location: ~ "^/fcgi-head/([a-f0-9]{64}).*$" +2025/08/19 07:57:54 [debug] 349771#349771: *3 using configuration "/upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http cl:296 max:104857600 +2025/08/19 07:57:54 [debug] 349771#349771: *3 rewrite phase: 3 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "PUT" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script regex: "^(PUT)$" +2025/08/19 07:57:54 [notice] 349771#349771: *3 "^(PUT)$" matches "PUT", client: 127.0.0.1, server: localhost, request: "PUT /upload HTTP/1.1", host: "localhost:9001" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script if +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script if: false +2025/08/19 07:57:54 [debug] 349771#349771: *3 post rewrite phase: 4 +2025/08/19 07:57:54 [debug] 349771#349771: *3 generic phase: 5 +2025/08/19 07:57:54 [debug] 349771#349771: *3 generic phase: 6 +2025/08/19 07:57:54 [debug] 349771#349771: *3 generic phase: 7 +2025/08/19 07:57:54 [debug] 349771#349771: *3 access phase: 8 +2025/08/19 07:57:54 [debug] 349771#349771: *3 access phase: 9 +2025/08/19 07:57:54 [debug] 349771#349771: *3 access phase: 10 +2025/08/19 07:57:54 [debug] 349771#349771: *3 post access phase: 11 +2025/08/19 07:57:54 [debug] 349771#349771: *3 generic phase: 12 +2025/08/19 07:57:54 [debug] 349771#349771: *3 generic phase: 13 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http client request body preread 240 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http request body content length filter +2025/08/19 07:57:54 [debug] 349771#349771: *3 http body new buf t:1 f:0 00005CE0436093B0, pos 00005CE0436093B0, size: 240 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http read client request body +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: eof:0, avail:56 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: fd:6 56 of 56 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: avail:0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http client request body recv 56 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http body new buf t:1 f:0 00005CE04361B400, pos 00005CE04361B400, size: 56 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http client request body rest 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http init upstream, client timer: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 epoll add event: fd:6 op:3 ev:80002005 +2025/08/19 07:57:54 [debug] 349771#349771: *3 posix_memalign: 00005CE043610140:4096 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "QUERY_STRING" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "QUERY_STRING: " +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "REQUEST_METHOD" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "PUT" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "REQUEST_METHOD: PUT" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "CONTENT_TYPE" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "application/octet-stream" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "CONTENT_TYPE: application/octet-stream" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "CONTENT_LENGTH" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "296" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "CONTENT_LENGTH: 296" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "SCRIPT_NAME" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "/upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "SCRIPT_NAME: /upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "REQUEST_URI" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "/upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "REQUEST_URI: /upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "DOCUMENT_URI" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "/upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "DOCUMENT_URI: /upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "DOCUMENT_ROOT" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "./blobs" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "DOCUMENT_ROOT: ./blobs" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "SERVER_PROTOCOL" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "HTTP/1.1" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "SERVER_PROTOCOL: HTTP/1.1" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "REQUEST_SCHEME" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "http" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "REQUEST_SCHEME: http" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "GATEWAY_INTERFACE" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "CGI/1.1" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "GATEWAY_INTERFACE: CGI/1.1" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "SERVER_SOFTWARE" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "nginx/" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "1.18.0" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "SERVER_SOFTWARE: nginx/1.18.0" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "REMOTE_ADDR" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "127.0.0.1" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "REMOTE_ADDR: 127.0.0.1" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "REMOTE_PORT" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "33322" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "REMOTE_PORT: 33322" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "SERVER_ADDR" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "127.0.0.1" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "SERVER_ADDR: 127.0.0.1" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "SERVER_PORT" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "9001" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "SERVER_PORT: 9001" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "SERVER_NAME" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "localhost" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "SERVER_NAME: localhost" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "REDIRECT_STATUS" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "200" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "REDIRECT_STATUS: 200" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "SCRIPT_FILENAME" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script var: "./blobs" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http script copy: "/ginxsom.fcgi" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "SCRIPT_FILENAME: ./blobs/ginxsom.fcgi" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "HTTP_HOST: localhost:9001" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "HTTP_USER_AGENT: curl/8.15.0" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "HTTP_ACCEPT: */*" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "HTTP_AUTHORIZATION: Nostr eyJraW5kIjoyNDI0MiwiaWQiOiIwNDZiN2E3MDBjZTAzZjQ0NGFhYmNkY2Y1NGVlOGM5ZGNhZmJhODhkY2IzNzM2NzYwODFkMDkyOTZkMDU5NGZmIiwicHVia2V5IjoiNzliZTY2N2VmOWRjYmJhYzU1YTA2Mjk1Y2U4NzBiMDcwMjliZmNkYjJkY2UyOGQ5NTlmMjgxNWIxNmY4MTc5OCIsImNyZWF0ZWRfYXQiOjE3NTU2MDQ2NzQsInRhZ3MiOltbInQiLCJ1cGxvYWQiXSxbIngiLCJhZTlmNTljN2FjMzg2YjdmZTYzNDNkNjY5ZmMyN2YzN2Q3YjY2MjU2ODI0YmU2NTVkMjlhMjU2OTA4ZjE1NGU5Il0sWyJleHBpcmF0aW9uIiwiMTc1NTYwODI3NCJdXSwiY29udGVudCI6IiIsInNpZyI6ImZlNzBiMDU4NTM1YjM1ZTFjNzY1NDkyNmFiMDczZTdlNzZhZTgyZjQ1N2RmOWZhYzRiNTFlZTkzMmQ1Mzg2NzM3NWE2NGM0NThmZDBkNGM0MjgyMGIxZDI4ZWQzNTZiMzkzMDQ5MzU5YTEyNWM5NGY4MzNlZjUyYjFlNmRkZGM5In0=" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "HTTP_CONTENT_TYPE: application/octet-stream" +2025/08/19 07:57:54 [debug] 349771#349771: *3 fastcgi param: "HTTP_CONTENT_LENGTH: 296" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http cleanup add: 00005CE04361B718 +2025/08/19 07:57:54 [debug] 349771#349771: *3 get rr peer, try: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 stream socket 10 +2025/08/19 07:57:54 [debug] 349771#349771: *3 epoll add connection: fd:10 ev:80002005 +2025/08/19 07:57:54 [debug] 349771#349771: *3 connect to unix:/tmp/ginxsom-fcgi.sock, fd:10 #4 +2025/08/19 07:57:54 [debug] 349771#349771: *3 connected +2025/08/19 07:57:54 [debug] 349771#349771: *3 http upstream connect: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 posix_memalign: 00005CE0435EFF20:128 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http upstream send request +2025/08/19 07:57:54 [debug] 349771#349771: *3 http upstream send request body +2025/08/19 07:57:54 [debug] 349771#349771: *3 chain writer buf fl:0 s:1256 +2025/08/19 07:57:54 [debug] 349771#349771: *3 chain writer buf fl:0 s:240 +2025/08/19 07:57:54 [debug] 349771#349771: *3 chain writer buf fl:0 s:8 +2025/08/19 07:57:54 [debug] 349771#349771: *3 chain writer buf fl:0 s:56 +2025/08/19 07:57:54 [debug] 349771#349771: *3 chain writer buf fl:0 s:8 +2025/08/19 07:57:54 [debug] 349771#349771: *3 chain writer in: 00005CE04361B7A8 +2025/08/19 07:57:54 [debug] 349771#349771: *3 writev: 1568 of 1568 +2025/08/19 07:57:54 [debug] 349771#349771: *3 chain writer out: 0000000000000000 +2025/08/19 07:57:54 [debug] 349771#349771: *3 event timer add: 10: 60000:171468057 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http finalize request: -4, "/upload?" a:1, c:2 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http request count:2 blk:0 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 0 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: 60000 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:6 ev:0004 d:000075EA426D11E0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http run request: "/upload?" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http upstream check client, write event:1, "/upload" +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:10 ev:2005 d:000075EA426D12C8 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http upstream request: "/upload?" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http upstream process header +2025/08/19 07:57:54 [debug] 349771#349771: *3 malloc: 00005CE043611150:4096 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: eof:1, avail:-1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: fd:10 184 of 4096 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 01 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 06 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 01 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 95 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 03 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record length: 149 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi parser: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi header: "DEBUG: FastCGI received request" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi parser: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi header: "DEBUG: METHOD=PUT, URI=/upload" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi parser: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi header: "Status: 501 Not Implemented" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi parser: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi header: "Content-Type: text/plain" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi parser: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi header done +2025/08/19 07:57:54 [debug] 349771#349771: *3 HTTP/1.1 501 Not Implemented +Server: nginx/1.18.0 (Ubuntu) +Date: Tue, 19 Aug 2025 11:57:54 GMT +Content-Type: text/plain +Transfer-Encoding: chunked +Connection: keep-alive +DEBUG: FastCGI received request +DEBUG: METHOD=PUT, URI=/upload + +2025/08/19 07:57:54 [debug] 349771#349771: *3 write new buf t:1 f:0 00005CE0436107C8, pos 00005CE0436107C8, size: 243 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http write filter: l:0 f:0 s:243 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http cacheable: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http upstream process upstream +2025/08/19 07:57:54 [debug] 349771#349771: *3 pipe read upstream: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 pipe preread: 54 +2025/08/19 07:57:54 [debug] 349771#349771: *3 readv: eof:1, avail:0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 readv: 1, last:3912 +2025/08/19 07:57:54 [debug] 349771#349771: *3 pipe recv chain: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 pipe buf free s:0 t:1 f:0 00005CE043611150, pos 00005CE0436111D2, size: 54 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 pipe length: -1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 input buf #0 00005CE0436111D2 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 01 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 06 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 01 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record length: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi closed stdout +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 01 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 03 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 01 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 08 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record byte: 00 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi record length: 8 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http fastcgi sent end request +2025/08/19 07:57:54 [debug] 349771#349771: *3 input buf 00005CE0436111D2 27 +2025/08/19 07:57:54 [debug] 349771#349771: *3 pipe write downstream: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 pipe write downstream flush in +2025/08/19 07:57:54 [debug] 349771#349771: *3 http output filter "/upload?" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http copy filter: "/upload?" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http postpone filter "/upload?" 00005CE04361B778 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http chunk: 27 +2025/08/19 07:57:54 [debug] 349771#349771: *3 write old buf t:1 f:0 00005CE0436107C8, pos 00005CE0436107C8, size: 243 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 write new buf t:1 f:0 00005CE04361B958, pos 00005CE04361B958, size: 4 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 write new buf t:1 f:0 00005CE043611150, pos 00005CE0436111D2, size: 27 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 write new buf t:0 f:0 0000000000000000, pos 00005CE037AC92E8, size: 2 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http write filter: l:0 f:0 s:276 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http copy filter: 0 "/upload?" +2025/08/19 07:57:54 [debug] 349771#349771: *3 pipe write downstream done +2025/08/19 07:57:54 [debug] 349771#349771: *3 event timer: 10, old: 171468057, new: 171468059 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http upstream exit: 0000000000000000 +2025/08/19 07:57:54 [debug] 349771#349771: *3 finalize http upstream request: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 finalize http fastcgi request +2025/08/19 07:57:54 [debug] 349771#349771: *3 free rr peer 1 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 close http upstream connection: 10 +2025/08/19 07:57:54 [debug] 349771#349771: *3 free: 00005CE0435EFF20, unused: 48 +2025/08/19 07:57:54 [debug] 349771#349771: *3 event timer del: 10: 171468057 +2025/08/19 07:57:54 [debug] 349771#349771: *3 reusable connection: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http upstream temp fd: -1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http output filter "/upload?" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http copy filter: "/upload?" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http postpone filter "/upload?" 00007FFDD38FD270 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http chunk: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 write old buf t:1 f:0 00005CE0436107C8, pos 00005CE0436107C8, size: 243 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 write old buf t:1 f:0 00005CE04361B958, pos 00005CE04361B958, size: 4 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 write old buf t:1 f:0 00005CE043611150, pos 00005CE0436111D2, size: 27 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 write old buf t:0 f:0 0000000000000000, pos 00005CE037AC92E8, size: 2 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 write new buf t:0 f:0 0000000000000000, pos 00005CE037AC92E5, size: 5 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http write filter: l:1 f:0 s:281 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http write filter limit 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 writev: 281 of 281 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http write filter 0000000000000000 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http copy filter: 0 "/upload?" +2025/08/19 07:57:54 [debug] 349771#349771: *3 http finalize request: 0, "/upload?" a:1, c:1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 set http keepalive handler +2025/08/19 07:57:54 [debug] 349771#349771: *3 http close request +2025/08/19 07:57:54 [debug] 349771#349771: *3 http log handler +2025/08/19 07:57:54 [debug] 349771#349771: *3 free: 00005CE043611150 +2025/08/19 07:57:54 [debug] 349771#349771: *3 free: 00005CE043624610, unused: 3 +2025/08/19 07:57:54 [debug] 349771#349771: *3 free: 00005CE04361A980, unused: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 free: 00005CE043610140, unused: 1234 +2025/08/19 07:57:54 [debug] 349771#349771: *3 free: 00005CE0436090A0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 hc free: 0000000000000000 +2025/08/19 07:57:54 [debug] 349771#349771: *3 hc busy: 0000000000000000 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 tcp_nodelay +2025/08/19 07:57:54 [debug] 349771#349771: *3 reusable connection: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 event timer add: 6: 65000:171473059 +2025/08/19 07:57:54 [debug] 349771#349771: *3 post event 00005CE04364A320 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 2 +2025/08/19 07:57:54 [debug] 349771#349771: posted event 00005CE04364A320 +2025/08/19 07:57:54 [debug] 349771#349771: *3 delete posted event 00005CE04364A320 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http keepalive handler +2025/08/19 07:57:54 [debug] 349771#349771: *3 malloc: 00005CE0436090A0:1024 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: eof:0, avail:0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 free: 00005CE0436090A0 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: 65000 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:6 ev:2005 d:000075EA426D11E0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 http keepalive handler +2025/08/19 07:57:54 [debug] 349771#349771: *3 malloc: 00005CE0436090A0:1024 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: eof:1, avail:-1 +2025/08/19 07:57:54 [debug] 349771#349771: *3 recv: fd:6 0 of 1024 +2025/08/19 07:57:54 [info] 349771#349771: *3 client 127.0.0.1 closed keepalive connection +2025/08/19 07:57:54 [debug] 349771#349771: *3 close http connection: 6 +2025/08/19 07:57:54 [debug] 349771#349771: *3 event timer del: 6: 171473059 +2025/08/19 07:57:54 [debug] 349771#349771: *3 reusable connection: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 free: 00005CE0436090A0 +2025/08/19 07:57:54 [debug] 349771#349771: *3 free: 00005CE043606840, unused: 120 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 1 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: -1 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:5 ev:0001 d:000075EA426D1010 +2025/08/19 07:57:54 [debug] 349771#349771: accept on 0.0.0.0:9001, ready: 0 +2025/08/19 07:57:54 [debug] 349771#349771: posix_memalign: 00005CE043606840:512 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *5 accept: 127.0.0.1:33334 fd:6 +2025/08/19 07:57:54 [debug] 349771#349771: *5 event timer add: 6: 60000:171468068 +2025/08/19 07:57:54 [debug] 349771#349771: *5 reusable connection: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *5 epoll add event: fd:6 op:1 ev:80002001 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 8 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: 60000 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:6 ev:0001 d:000075EA426D11E1 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http wait request handler +2025/08/19 07:57:54 [debug] 349771#349771: *5 malloc: 00005CE0436090A0:1024 +2025/08/19 07:57:54 [debug] 349771#349771: *5 recv: eof:0, avail:-1 +2025/08/19 07:57:54 [debug] 349771#349771: *5 recv: fd:6 142 of 1024 +2025/08/19 07:57:54 [debug] 349771#349771: *5 reusable connection: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 posix_memalign: 00005CE043624610:4096 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http process request line +2025/08/19 07:57:54 [debug] 349771#349771: *5 http request line: "GET /ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9 HTTP/1.1" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http uri: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http args: "" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http exten: "" +2025/08/19 07:57:54 [debug] 349771#349771: *5 posix_memalign: 00005CE04361A980:4096 @16 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http process request header line +2025/08/19 07:57:54 [debug] 349771#349771: *5 http header: "Host: localhost:9001" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http header: "User-Agent: curl/8.15.0" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http header: "Accept: */*" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http header done +2025/08/19 07:57:54 [debug] 349771#349771: *5 event timer del: 6: 171468068 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 rewrite phase: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *5 test location: "/health" +2025/08/19 07:57:54 [debug] 349771#349771: *5 test location: "/debug/list" +2025/08/19 07:57:54 [debug] 349771#349771: *5 test location: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:57:54 [debug] 349771#349771: *5 using configuration "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http cl:-1 max:104857600 +2025/08/19 07:57:54 [debug] 349771#349771: *5 rewrite phase: 3 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script var +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script var: "GET" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script value: "HEAD" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script equal +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script equal: no +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script if +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script if: false +2025/08/19 07:57:54 [debug] 349771#349771: *5 post rewrite phase: 4 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 5 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 6 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 7 +2025/08/19 07:57:54 [debug] 349771#349771: *5 access phase: 8 +2025/08/19 07:57:54 [debug] 349771#349771: *5 access phase: 9 +2025/08/19 07:57:54 [debug] 349771#349771: *5 access phase: 10 +2025/08/19 07:57:54 [debug] 349771#349771: *5 post access phase: 11 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 12 +2025/08/19 07:57:54 [debug] 349771#349771: *5 try files handler +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".jpg" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.jpg" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.jpg" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".jpeg" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.jpeg" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.jpeg" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".png" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.png" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.png" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".webp" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.webp" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.webp" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".gif" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.gif" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.gif" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".pdf" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.pdf" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.pdf" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".mp4" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.mp4" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.mp4" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".mp3" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.mp3" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.mp3" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".txt" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.txt" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.txt" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script capture: "ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http script copy: ".md=404" +2025/08/19 07:57:54 [debug] 349771#349771: *5 trying to use file: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404" "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404" +2025/08/19 07:57:54 [debug] 349771#349771: *5 internal redirect: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404?" +2025/08/19 07:57:54 [debug] 349771#349771: *5 rewrite phase: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *5 test location: "/health" +2025/08/19 07:57:54 [debug] 349771#349771: *5 test location: "/debug/list" +2025/08/19 07:57:54 [debug] 349771#349771: *5 test location: "/" +2025/08/19 07:57:54 [debug] 349771#349771: *5 test location: ~ "^/([a-f0-9]{64})(\.[a-zA-Z0-9]+)?$" +2025/08/19 07:57:54 [debug] 349771#349771: *5 test location: ~ "^/fcgi-head/([a-f0-9]{64}).*$" +2025/08/19 07:57:54 [debug] 349771#349771: *5 using configuration "" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http cl:-1 max:104857600 +2025/08/19 07:57:54 [debug] 349771#349771: *5 rewrite phase: 3 +2025/08/19 07:57:54 [debug] 349771#349771: *5 post rewrite phase: 4 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 5 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 6 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 7 +2025/08/19 07:57:54 [debug] 349771#349771: *5 access phase: 8 +2025/08/19 07:57:54 [debug] 349771#349771: *5 access phase: 9 +2025/08/19 07:57:54 [debug] 349771#349771: *5 access phase: 10 +2025/08/19 07:57:54 [debug] 349771#349771: *5 post access phase: 11 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 12 +2025/08/19 07:57:54 [debug] 349771#349771: *5 generic phase: 13 +2025/08/19 07:57:54 [debug] 349771#349771: *5 content phase: 14 +2025/08/19 07:57:54 [debug] 349771#349771: *5 content phase: 15 +2025/08/19 07:57:54 [debug] 349771#349771: *5 content phase: 16 +2025/08/19 07:57:54 [debug] 349771#349771: *5 content phase: 17 +2025/08/19 07:57:54 [debug] 349771#349771: *5 content phase: 18 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http filename: "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404" +2025/08/19 07:57:54 [debug] 349771#349771: *5 add cleanup: 00005CE04361AD60 +2025/08/19 07:57:54 [error] 349771#349771: *5 open() "./blobs/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9 HTTP/1.1", host: "localhost:9001" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http finalize request: 404, "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404?" a:1, c:2 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http special response: 404, "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404?" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http set discard body +2025/08/19 07:57:54 [debug] 349771#349771: *5 HTTP/1.1 404 Not Found +Server: nginx/1.18.0 (Ubuntu) +Date: Tue, 19 Aug 2025 11:57:54 GMT +Content-Type: text/html +Content-Length: 162 +Connection: keep-alive + +2025/08/19 07:57:54 [debug] 349771#349771: *5 write new buf t:1 f:0 00005CE04361ADE0, pos 00005CE04361ADE0, size: 164 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http write filter: l:0 f:0 s:164 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http output filter "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404?" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http copy filter: "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404?" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http postpone filter "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404?" 00005CE04361AFD0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 write old buf t:1 f:0 00005CE04361ADE0, pos 00005CE04361ADE0, size: 164 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 write new buf t:0 f:0 0000000000000000, pos 00005CE037B08580, size: 100 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 write new buf t:0 f:0 0000000000000000, pos 00005CE037B08C80, size: 62 file: 0, size: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http write filter: l:1 f:0 s:326 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http write filter limit 0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 writev: 326 of 326 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http write filter 0000000000000000 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http copy filter: 0 "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404?" +2025/08/19 07:57:54 [debug] 349771#349771: *5 http finalize request: 0, "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404?" a:1, c:2 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http request count:2 blk:0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http finalize request: -4, "/ae9f59c7ac386b7fe6343d669fc27f37d7b66256824be655d29a256908f154e9.md=404?" a:1, c:1 +2025/08/19 07:57:54 [debug] 349771#349771: *5 set http keepalive handler +2025/08/19 07:57:54 [debug] 349771#349771: *5 http close request +2025/08/19 07:57:54 [debug] 349771#349771: *5 http log handler +2025/08/19 07:57:54 [debug] 349771#349771: *5 free: 00005CE043624610, unused: 2 +2025/08/19 07:57:54 [debug] 349771#349771: *5 free: 00005CE04361A980, unused: 2232 +2025/08/19 07:57:54 [debug] 349771#349771: *5 free: 00005CE0436090A0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 hc free: 0000000000000000 +2025/08/19 07:57:54 [debug] 349771#349771: *5 hc busy: 0000000000000000 0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 tcp_nodelay +2025/08/19 07:57:54 [debug] 349771#349771: *5 reusable connection: 1 +2025/08/19 07:57:54 [debug] 349771#349771: *5 event timer add: 6: 65000:171473068 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 0 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: 65000 +2025/08/19 07:57:54 [debug] 349771#349771: epoll: fd:6 ev:2001 d:000075EA426D11E1 +2025/08/19 07:57:54 [debug] 349771#349771: *5 http keepalive handler +2025/08/19 07:57:54 [debug] 349771#349771: *5 malloc: 00005CE0436090A0:1024 +2025/08/19 07:57:54 [debug] 349771#349771: *5 recv: eof:1, avail:-1 +2025/08/19 07:57:54 [debug] 349771#349771: *5 recv: fd:6 0 of 1024 +2025/08/19 07:57:54 [info] 349771#349771: *5 client 127.0.0.1 closed keepalive connection +2025/08/19 07:57:54 [debug] 349771#349771: *5 close http connection: 6 +2025/08/19 07:57:54 [debug] 349771#349771: *5 event timer del: 6: 171473068 +2025/08/19 07:57:54 [debug] 349771#349771: *5 reusable connection: 0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 free: 00005CE0436090A0 +2025/08/19 07:57:54 [debug] 349771#349771: *5 free: 00005CE043606840, unused: 136 +2025/08/19 07:57:54 [debug] 349771#349771: timer delta: 2 +2025/08/19 07:57:54 [debug] 349771#349771: worker cycle +2025/08/19 07:57:54 [debug] 349771#349771: epoll timer: -1 diff --git a/logs/nginx.pid b/logs/nginx.pid index 16483d7..f6d4973 100644 --- a/logs/nginx.pid +++ b/logs/nginx.pid @@ -1 +1 @@ -296457 +349770 diff --git a/mime.types b/mime.types new file mode 100644 index 0000000..d721056 --- /dev/null +++ b/mime.types @@ -0,0 +1,95 @@ +types { + text/html html htm shtml; + text/css css; + text/xml xml; + image/gif gif; + image/jpeg jpeg jpg; + image/png png; + image/webp webp; + application/javascript js; + application/atom+xml atom; + application/rss+xml rss; + + text/mathml mml; + text/plain txt; + text/vnd.sun.j2me.app-descriptor jad; + text/vnd.wap.wml wml; + text/x-component htc; + + image/avif avif; + image/svg+xml svg svgz; + image/tiff tif tiff; + image/vnd.wap.wbmp wbmp; + image/x-icon ico; + image/x-jng jng; + image/x-ms-bmp bmp; + + font/woff woff; + font/woff2 woff2; + + application/java-archive jar war ear; + application/json json; + application/mac-binhex40 hqx; + application/msword doc; + application/pdf pdf; + application/postscript ps eps ai; + application/rtf rtf; + application/vnd.apple.mpegurl m3u8; + application/vnd.google-earth.kml+xml kml; + application/vnd.google-earth.kmz kmz; + application/vnd.ms-excel xls; + application/vnd.ms-fontobject eot; + application/vnd.ms-powerpoint ppt; + application/vnd.oasis.opendocument.graphics odg; + application/vnd.oasis.opendocument.presentation odp; + application/vnd.oasis.opendocument.spreadsheet ods; + application/vnd.oasis.opendocument.text odt; + application/vnd.openxmlformats-officedocument.presentationml.presentation pptx; + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx; + application/vnd.openxmlformats-officedocument.wordprocessingml.document docx; + application/vnd.wap.wmlc wmlc; + application/wasm wasm; + application/x-7z-compressed 7z; + application/x-cocoa cco; + application/x-java-archive-diff jardiff; + application/x-java-jnlp-file jnlp; + application/x-makeself run; + application/x-perl pl pm; + application/x-pilot prc pdb; + application/x-rar-compressed rar; + application/x-redhat-package-manager rpm; + application/x-sea sea; + application/x-shockwave-flash swf; + application/x-stuffit sit; + application/x-tcl tcl tk; + application/x-x509-ca-cert der pem crt; + application/x-xpinstall xpi; + application/xhtml+xml xhtml; + application/xspf+xml xspf; + application/zip zip; + + application/octet-stream bin exe dll; + application/octet-stream deb; + application/octet-stream dmg; + application/octet-stream iso img; + application/octet-stream msi msp msm; + + audio/midi mid midi kar; + audio/mpeg mp3; + audio/ogg ogg; + audio/x-m4a m4a; + audio/x-realaudio ra; + + video/3gpp 3gpp 3gp; + video/mp2t ts; + video/mp4 mp4; + video/mpeg mpeg mpg; + video/quicktime mov; + video/webm webm; + video/x-flv flv; + video/x-m4v m4v; + video/x-mng mng; + video/x-ms-asf asx asf; + video/x-ms-wmv wmv; + video/x-msvideo avi; +} diff --git a/nostr_core_lib b/nostr_core_lib index 1da4f67..77d92db 160000 --- a/nostr_core_lib +++ b/nostr_core_lib @@ -1 +1 @@ -Subproject commit 1da4f6751ea6e275ece6226b13806de630abf482 +Subproject commit 77d92dbcf9f59d08bbf96f9dd42fcdca048b9154 diff --git a/put_test.sh b/put_test.sh new file mode 100755 index 0000000..2e94f74 --- /dev/null +++ b/put_test.sh @@ -0,0 +1,249 @@ +#!/bin/bash + +# put_test.sh - Test script for Ginxsom Blossom server upload functionality +# This script simulates a user uploading a blob to ginxsom using proper Blossom authentication + +set -e # Exit on any error + +# Configuration +SERVER_URL="http://localhost:9001" +UPLOAD_ENDPOINT="${SERVER_URL}/upload" +TEST_FILE="test_blob_$(date +%s).txt" +CLEANUP_FILES=() + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Cleanup function +cleanup() { + echo -e "${YELLOW}Cleaning up temporary files...${NC}" + for file in "${CLEANUP_FILES[@]}"; do + if [[ -f "$file" ]]; then + rm -f "$file" + echo "Removed: $file" + fi + done +} + +# Set up cleanup on exit +trap cleanup EXIT + +# Helper functions +log_info() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +log_success() { + echo -e "${GREEN}[SUCCESS]${NC} $1" +} + +log_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +log_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +# Check prerequisites +check_prerequisites() { + log_info "Checking prerequisites..." + + # Check if nak is installed + if ! command -v nak &> /dev/null; then + log_error "nak command not found. Please install nak first." + log_info "Install with: go install github.com/fiatjaf/nak@latest" + exit 1 + fi + log_success "nak is installed" + + # Check if curl is available + if ! command -v curl &> /dev/null; then + log_error "curl command not found. Please install curl." + exit 1 + fi + log_success "curl is available" + + # Check if sha256sum is available + if ! command -v sha256sum &> /dev/null; then + log_error "sha256sum command not found." + exit 1 + fi + log_success "sha256sum is available" + + # Check if base64 is available + if ! command -v base64 &> /dev/null; then + log_error "base64 command not found." + exit 1 + fi + log_success "base64 is available" +} + +# Check if server is running +check_server() { + log_info "Checking if server is running..." + + if curl -s -f "${SERVER_URL}/health" > /dev/null 2>&1; then + log_success "Server is running at ${SERVER_URL}" + else + log_error "Server is not responding at ${SERVER_URL}" + log_info "Please start the server with: ./scripts/start-fcgi.sh && nginx -p . -c config/local-nginx.conf" + exit 1 + fi +} + +# Create test file +create_test_file() { + log_info "Creating test file: ${TEST_FILE}" + + # Create test content with timestamp and random data + cat > "${TEST_FILE}" << EOF +Test blob content for Ginxsom Blossom server +Timestamp: $(date -Iseconds) +Random data: $(openssl rand -hex 32) +Test message: Hello from put_test.sh! + +This file is used to test the upload functionality +of the Ginxsom Blossom server implementation. +EOF + + CLEANUP_FILES+=("${TEST_FILE}") + log_success "Created test file with $(wc -c < "${TEST_FILE}") bytes" +} + +# Calculate file hash +calculate_hash() { + log_info "Calculating SHA-256 hash..." + + HASH=$(sha256sum "${TEST_FILE}" | cut -d' ' -f1) + log_success "File hash: ${HASH}" +} + +# Generate nostr event +generate_nostr_event() { + log_info "Generating kind 24242 nostr event with nak..." + + # Calculate expiration time (1 hour from now) + EXPIRATION=$(date -d '+1 hour' +%s) + + # Generate the event using nak + EVENT_JSON=$(nak event -k 24242 -c "" \ + -t "t=upload" \ + -t "x=${HASH}" \ + -t "expiration=${EXPIRATION}") + + if [[ -z "$EVENT_JSON" ]]; then + log_error "Failed to generate nostr event" + exit 1 + fi + + log_success "Generated nostr event" + echo "Event JSON: $EVENT_JSON" +} + +# Create authorization header +create_auth_header() { + log_info "Creating authorization header..." + + # Base64 encode the event (without newlines) + AUTH_B64=$(echo -n "$EVENT_JSON" | base64 -w 0) + AUTH_HEADER="Nostr ${AUTH_B64}" + + log_success "Created authorization header" + echo "Auth header length: ${#AUTH_HEADER} characters" +} + +# Perform upload +perform_upload() { + log_info "Performing upload to ${UPLOAD_ENDPOINT}..." + + # Create temporary file for response + RESPONSE_FILE=$(mktemp) + CLEANUP_FILES+=("${RESPONSE_FILE}") + + # Perform the upload with verbose output + HTTP_STATUS=$(curl -s -w "%{http_code}" \ + -X PUT \ + -H "Authorization: ${AUTH_HEADER}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary "@${TEST_FILE}" \ + "${UPLOAD_ENDPOINT}" \ + -o "${RESPONSE_FILE}") + + echo "HTTP Status: ${HTTP_STATUS}" + echo "Response body:" + cat "${RESPONSE_FILE}" + echo + + # Check response + case "${HTTP_STATUS}" in + 200) + log_success "Upload successful!" + ;; + 201) + log_success "Upload successful (created)!" + ;; + 400) + log_error "Bad request - check the event format" + ;; + 401) + log_error "Unauthorized - authentication failed" + ;; + 405) + log_error "Method not allowed - check nginx configuration" + ;; + 413) + log_error "Payload too large" + ;; + 501) + log_warning "Upload endpoint not yet implemented (expected for now)" + ;; + *) + log_error "Upload failed with HTTP status: ${HTTP_STATUS}" + ;; + esac +} + +# Test file retrieval +test_retrieval() { + log_info "Testing file retrieval..." + + RETRIEVAL_URL="${SERVER_URL}/${HASH}" + + if curl -s -f "${RETRIEVAL_URL}" > /dev/null 2>&1; then + log_success "File can be retrieved at: ${RETRIEVAL_URL}" + else + log_warning "File not yet available for retrieval (expected if upload processing not implemented)" + fi +} + +# Main execution +main() { + echo "=== Ginxsom Blossom Upload Test ===" + echo "Timestamp: $(date -Iseconds)" + echo + + check_prerequisites + check_server + create_test_file + calculate_hash + generate_nostr_event + create_auth_header + perform_upload + test_retrieval + + echo + log_info "Test completed!" + echo "Summary:" + echo " Test file: ${TEST_FILE}" + echo " File hash: ${HASH}" + echo " Server: ${SERVER_URL}" + echo " Upload endpoint: ${UPLOAD_ENDPOINT}" +} + +# Run main function +main "$@" diff --git a/src/ginxsom.h b/src/ginxsom.h new file mode 100644 index 0000000..34505bd --- /dev/null +++ b/src/ginxsom.h @@ -0,0 +1,84 @@ +/* + * Ginxsom Blossom Server Header + * + * This header contains all function declarations and type definitions + * organized by BUD (Blossom Unified Draft) sections. + */ + +#ifndef GINXSOM_H +#define GINXSOM_H + +#include +#include +#include +#include +#include +#include "../nostr_core_lib/cjson/cJSON.h" +#include "../nostr_core_lib/nostr_core/nostr_core.h" + +#ifdef __cplusplus +extern "C" { +#endif + +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// +// BUD 01 - Basic Protocol Flow +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// + +// Database connection management +extern sqlite3* db; +int init_database(void); +void close_database(void); + +// SHA-256 extraction and validation +const char* extract_sha256_from_uri(const char* uri); + +// HEAD request handling +void handle_head_request(const char* uri); + +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// +// BUD 02 - Upload & Authentication +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// + +// Authorization header parsing +int parse_authorization_header(const char* auth_header, char* event_json, size_t json_size); + +// Blossom event validation (specific to kind 24242) +int validate_blossom_event(cJSON* event, const char* expected_hash, const char* method); + +// Main authentication orchestrator +int authenticate_request(const char* auth_header, const char* method, const char* file_hash); + +// Upload handling +void handle_upload_request(void); + +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// +// BUD 06 - Upload Requirements +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// + +// Upload policy management (for future implementation) +void handle_upload_requirements_request(void); + +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// +// UTILITY FUNCTIONS +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// + +// HTTP response helpers +void send_error_response(int status_code, const char* message); +void send_json_response(int status_code, const char* json_content); + +// Logging utilities +void log_request(const char* method, const char* uri, int status_code); + +#ifdef __cplusplus +} +#endif + +#endif // GINXSOM_H diff --git a/src/main.c b/src/main.c index 676e422..8146921 100644 --- a/src/main.c +++ b/src/main.c @@ -3,14 +3,18 @@ * Handles HEAD requests and other dynamic operations */ +#define _GNU_SOURCE #include #include #include +#include #include #include #include #include #include +#include +#include "ginxsom.h" #define MAX_SHA256_LEN 65 #define MAX_PATH_LEN 512 @@ -218,6 +222,266 @@ const char* extract_sha256_from_uri(const char* uri) { return sha256_buffer; } +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// +// BUD 02 - Upload & Authentication +///////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////// + +// Parse Authorization header and extract JSON event +int parse_authorization_header(const char* auth_header, char* event_json, size_t json_size) { + if (!auth_header || !event_json) { + return NOSTR_ERROR_INVALID_INPUT; + } + + // Check for "Nostr " prefix (case-insensitive) + const char* prefix = "nostr "; + size_t prefix_len = strlen(prefix); + + if (strncasecmp(auth_header, prefix, prefix_len) != 0) { + printf("DEBUG: Authorization header missing 'Nostr ' prefix\r\n"); + return NOSTR_ERROR_INVALID_INPUT; + } + + // Extract base64 encoded event after "Nostr " + const char* base64_event = auth_header + prefix_len; + + // Decode base64 to JSON + // For now, we'll assume the event is already JSON (not base64 encoded) + // This is a simplified implementation - in production you'd need proper base64 decoding + size_t event_len = strlen(base64_event); + if (event_len >= json_size) { + printf("DEBUG: Event JSON too large for buffer\r\n"); + return NOSTR_ERROR_INVALID_INPUT; + } + + strncpy(event_json, base64_event, json_size - 1); + event_json[json_size - 1] = '\0'; + + printf("DEBUG: Parsed authorization header, extracted JSON: %.100s...\r\n", event_json); + return NOSTR_SUCCESS; +} + +// Validate Blossom-specific event requirements (kind 24242) +int validate_blossom_event(cJSON* event, const char* expected_hash, const char* method) { + if (!event) { + return NOSTR_ERROR_INVALID_INPUT; + } + + printf("DEBUG: Validating Blossom event\r\n"); + + // Check event kind (must be 24242 for Blossom uploads) + cJSON* kind_json = cJSON_GetObjectItem(event, "kind"); + if (!kind_json || !cJSON_IsNumber(kind_json)) { + printf("DEBUG: Event missing or invalid 'kind' field\r\n"); + return NOSTR_ERROR_EVENT_INVALID_CONTENT; + } + + int kind = cJSON_GetNumberValue(kind_json); + if (kind != 24242) { + printf("DEBUG: Event kind %d is not 24242 (Blossom upload)\r\n", kind); + return NOSTR_ERROR_EVENT_INVALID_CONTENT; + } + + // Check that created_at exists (basic validation) + cJSON* created_at_json = cJSON_GetObjectItem(event, "created_at"); + if (!created_at_json || !cJSON_IsNumber(created_at_json)) { + printf("DEBUG: Event missing or invalid 'created_at' field\r\n"); + return NOSTR_ERROR_EVENT_INVALID_CONTENT; + } + + // Look for expiration in tags + cJSON* tags = cJSON_GetObjectItem(event, "tags"); + if (!tags || !cJSON_IsArray(tags)) { + printf("DEBUG: Event missing or invalid 'tags' field\r\n"); + return NOSTR_ERROR_EVENT_INVALID_CONTENT; + } + + time_t expiration = 0; + int found_method = 0; + int found_hash = 0; + + // Parse tags for 't' (method), 'x' (hash), and 'expiration' + cJSON* tag = NULL; + cJSON_ArrayForEach(tag, tags) { + if (!cJSON_IsArray(tag)) continue; + + cJSON* tag_name = cJSON_GetArrayItem(tag, 0); + if (!tag_name || !cJSON_IsString(tag_name)) continue; + + const char* tag_name_str = cJSON_GetStringValue(tag_name); + + if (strcmp(tag_name_str, "t") == 0) { + // Method tag + cJSON* method_value = cJSON_GetArrayItem(tag, 1); + if (method_value && cJSON_IsString(method_value)) { + const char* event_method = cJSON_GetStringValue(method_value); + if (strcmp(event_method, method) == 0) { + found_method = 1; + printf("DEBUG: Found matching method tag: %s\r\n", event_method); + } + } + } else if (strcmp(tag_name_str, "x") == 0) { + // Hash tag + cJSON* hash_value = cJSON_GetArrayItem(tag, 1); + if (hash_value && cJSON_IsString(hash_value)) { + const char* event_hash = cJSON_GetStringValue(hash_value); + if (expected_hash && strcmp(event_hash, expected_hash) == 0) { + found_hash = 1; + printf("DEBUG: Found matching hash tag: %s\r\n", event_hash); + } + } + } else if (strcmp(tag_name_str, "expiration") == 0) { + // Expiration tag + cJSON* exp_value = cJSON_GetArrayItem(tag, 1); + if (exp_value && cJSON_IsString(exp_value)) { + expiration = (time_t)atol(cJSON_GetStringValue(exp_value)); + printf("DEBUG: Found expiration tag: %ld\r\n", expiration); + } + } + } + + // Check if method matches (required) + if (!found_method) { + printf("DEBUG: Event missing or invalid method tag\r\n"); + return NOSTR_ERROR_EVENT_INVALID_CONTENT; + } + + // Check if hash matches (if provided) + if (expected_hash && !found_hash) { + printf("DEBUG: Event hash doesn't match expected hash\r\n"); + return NOSTR_ERROR_EVENT_INVALID_CONTENT; + } + + // Check expiration + time_t now = time(NULL); + if (expiration > 0 && now > expiration) { + printf("DEBUG: Event expired (now: %ld, exp: %ld)\r\n", now, expiration); + return NOSTR_ERROR_EVENT_INVALID_CONTENT; + } + + printf("DEBUG: Blossom event validation passed\r\n"); + return NOSTR_SUCCESS; +} + +// Main authentication function +int authenticate_request(const char* auth_header, const char* method, const char* file_hash) { + if (!auth_header) { + printf("DEBUG: No authorization header provided\r\n"); + return NOSTR_ERROR_INVALID_INPUT; + } + + printf("DEBUG: Authenticating request - method: %s, hash: %s\r\n", + method ? method : "null", file_hash ? file_hash : "null"); + + // Parse authorization header + char event_json[4096]; + int parse_result = parse_authorization_header(auth_header, event_json, sizeof(event_json)); + if (parse_result != NOSTR_SUCCESS) { + printf("DEBUG: Authorization header parsing failed: %d\r\n", parse_result); + return parse_result; + } + + // Parse JSON event + cJSON* event = cJSON_Parse(event_json); + if (!event) { + printf("DEBUG: Failed to parse JSON event\r\n"); + return NOSTR_ERROR_EVENT_INVALID_CONTENT; + } + + // Validate event structure and signature using nostr_core_lib + int validation_result = nostr_validate_event(event); + if (validation_result != NOSTR_SUCCESS) { + printf("DEBUG: Nostr event validation failed: %d (%s)\r\n", + validation_result, nostr_strerror(validation_result)); + cJSON_Delete(event); + return validation_result; + } + + // Validate Blossom-specific requirements + int blossom_result = validate_blossom_event(event, file_hash, method); + if (blossom_result != NOSTR_SUCCESS) { + printf("DEBUG: Blossom event validation failed: %d\r\n", blossom_result); + cJSON_Delete(event); + return blossom_result; + } + + cJSON_Delete(event); + printf("DEBUG: Authentication successful\r\n"); + return NOSTR_SUCCESS; +} + +// Handle PUT /upload requests +void handle_upload_request(void) { + printf("DEBUG: handle_upload_request called\r\n"); + + // Get HTTP headers + const char* auth_header = getenv("HTTP_AUTHORIZATION"); + const char* content_type = getenv("CONTENT_TYPE"); + const char* content_length_str = getenv("CONTENT_LENGTH"); + + printf("DEBUG: auth_header=%s\r\n", auth_header ? auth_header : "NULL"); + printf("DEBUG: content_type=%s\r\n", content_type ? content_type : "NULL"); + printf("DEBUG: content_length=%s\r\n", content_length_str ? content_length_str : "NULL"); + + // Validate required headers + if (!auth_header) { + printf("Status: 401 Unauthorized\r\n"); + printf("Content-Type: text/plain\r\n\r\n"); + printf("Authorization header required\n"); + return; + } + + if (!content_type) { + printf("Status: 400 Bad Request\r\n"); + printf("Content-Type: text/plain\r\n\r\n"); + printf("Content-Type header required\n"); + return; + } + + if (!content_length_str) { + printf("Status: 400 Bad Request\r\n"); + printf("Content-Type: text/plain\r\n\r\n"); + printf("Content-Length header required\n"); + return; + } + + long content_length = atol(content_length_str); + if (content_length <= 0 || content_length > 100 * 1024 * 1024) { // 100MB limit + printf("Status: 413 Payload Too Large\r\n"); + printf("Content-Type: text/plain\r\n\r\n"); + printf("File size must be between 1 byte and 100MB\n"); + return; + } + + // Authenticate the request + int auth_result = authenticate_request(auth_header, "PUT", NULL); + if (auth_result != NOSTR_SUCCESS) { + printf("DEBUG: Authentication failed: %d\r\n", auth_result); + printf("Status: 401 Unauthorized\r\n"); + printf("Content-Type: text/plain\r\n\r\n"); + printf("Authentication failed\n"); + return; + } + + printf("DEBUG: Authentication successful, proceeding with upload\r\n"); + + // For now, return a simple response indicating the upload endpoint is working + // In a full implementation, you would: + // 1. Read the file data from stdin + // 2. Calculate SHA-256 hash + // 3. Save file to blobs/ directory with proper extension + // 4. Store metadata in database + // 5. Return blob descriptor JSON + + printf("Status: 501 Not Implemented\r\n"); + printf("Content-Type: application/json\r\n\r\n"); + printf("{\n"); + printf(" \"message\": \"Upload endpoint authenticated successfully\",\n"); + printf(" \"note\": \"Full file upload implementation pending\"\n"); + printf("}\n"); +} + int main(void) { while (FCGI_Accept() >= 0) { // DEBUG: Log every request received @@ -249,6 +513,9 @@ int main(void) { printf("Content-Type: text/plain\r\n\r\n"); printf("Invalid SHA-256 hash in URI\n"); } + } else if (strcmp(request_method, "PUT") == 0 && strcmp(request_uri, "/upload") == 0) { + // Handle PUT /upload requests with authentication + handle_upload_request(); } else { // Other methods not implemented yet printf("Status: 501 Not Implemented\r\n");