Closed abnud1 closed 3 years ago
This bug has regressed in 22.1.2 at least. Exact same issue, sendfile forces the content-type to the autodetected mime type
@bitslip6, please note that v22.1.2 corresponds to the OpenSwoole fork https://github.com/openswoole/ext-openswoole/releases not this official Swoole repository.
This is the script I'm using:
consider test.js.br.zip which contains test.js.br inside just as an example.
curl -i --http2-prior-knowledge http://server:950
I would expect to see this output:Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning:" to save to a file.
HTTP/2 200 content-type: application/octet-stream content-encoding: br server: swoole-http-server date: Mon, 15 Nov 2021 20:41:13 GMT content-length: 53685
Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning:" to save to a file.
swoole
Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.8.1 Built => Nov 14 2021 09:07:25 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 1.1.1l 24 Aug 2021 dtls => enabled http2 => enabled pcre => enabled zlib => 1.2.11 brotli => E16777225/D16777225 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled
Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608