imposter icon indicating copy to clipboard operation
imposter copied to clipboard

Proxy statusCode: 304

Open sobchenyuk opened this issue 2 years ago • 1 comments

use postman, no problem use imposter proxy https://test --output-dir proxy -i proxy response statusCode: 304

My pc mac m1 2021

logs INFO[0000] starting proxy for upstream https://test on port 8080 DEBU[0042] received request OPTIONS /api/users/1/edit from client [::1]:56693 DEBU[0042] invoking upstream https://test with OPTIONS /api/users/1/edit [body: 0 bytes] DEBU[0042] received request OPTIONS /api/users?page=1&size=10 from client [::1]:56692 DEBU[0042] invoking upstream https://test with OPTIONS /api/users [body: 0 bytes] DEBU[0042] received request OPTIONS /api/users?page=1&size=10 from client [::1]:56694 DEBU[0042] invoking upstream https://test with OPTIONS /api/users [body: 0 bytes] DEBU[0042] received request OPTIONS /api/users/1/edit from client [::1]:56695 DEBU[0042] invoking upstream https://test with OPTIONS /api/users/1/edit [body: 0 bytes] DEBU[0042] upstream responded to OPTIONS https://test/api/users/1/edit with status 204 [body 0 bytes] DEBU[0042] wrote response [status: 204, body 0 bytes] to client [::1]:56695 INFO[0042] proxied OPTIONS /api/users/1/edit to upstream [status: 204, body 0 bytes] for client [::1]:56695 in 275.423625ms DEBU[0042] received request GET /api/users/1/edit from client [::1]:56695 DEBU[0042] invoking upstream https://test with GET /api/users/1/edit [body: 0 bytes] DEBU[0042] wrote response file proxy/api/users/1/OPTIONS-edit.txt for OPTIONS /api/users/1/edit [0 bytes] DEBU[0042] upstream responded to OPTIONS https://test/api/users?page=1&size=10 with status 204 [body 0 bytes] DEBU[0042] upstream responded to OPTIONS https://test/api/users?page=1&size=10 with status 204 [body 0 bytes] DEBU[0042] wrote config file proxy/test-config.yaml for OPTIONS /api/users/1/edit DEBU[0042] reusing identical response file proxy/api/users/1/OPTIONS-edit.txt for OPTIONS /api/users?page=1&size=10 DEBU[0042] wrote response [status: 204, body 0 bytes] to client [::1]:56692 INFO[0042] proxied OPTIONS /api/users?page=1&size=10 to upstream [status: 204, body 0 bytes] for client [::1]:56692 in 331.570208ms DEBU[0042] wrote config file proxy/test-config.yaml for OPTIONS /api/users?page=1&size=10 DEBU[0042] skipping recording of duplicate request OPTIONS /api/users?page=1&size=10 DEBU[0042] wrote response [status: 204, body 0 bytes] to client [::1]:56694 INFO[0042] proxied OPTIONS /api/users?page=1&size=10 to upstream [status: 204, body 0 bytes] for client [::1]:56694 in 284.153583ms DEBU[0042] received request GET /api/users?page=1&size=10 from client [::1]:56694 DEBU[0042] invoking upstream https://test with GET /api/users [body: 0 bytes] DEBU[0042] received request OPTIONS /api/users/filter/options from client [::1]:56692 DEBU[0042] invoking upstream https://test with OPTIONS /api/users/filter/options [body: 0 bytes] DEBU[0042] upstream responded to OPTIONS https://test/api/users/1/edit with status 204 [body 0 bytes] DEBU[0042] wrote response [status: 204, body 0 bytes] to client [::1]:56693 INFO[0042] proxied OPTIONS /api/users/1/edit to upstream [status: 204, body 0 bytes] for client [::1]:56693 in 347.920875ms DEBU[0042] skipping recording of duplicate request OPTIONS /api/users/1/edit DEBU[0042] upstream responded to OPTIONS https://test/api/users/filter/options with status 204 [body 0 bytes] DEBU[0042] wrote response [status: 204, body 0 bytes] to client [::1]:56692 INFO[0042] proxied OPTIONS /api/users/filter/options to upstream [status: 204, body 0 bytes] for client [::1]:56692 in 103.001ms DEBU[0042] reusing identical response file proxy/api/users/1/OPTIONS-edit.txt for OPTIONS /api/users/filter/options DEBU[0042] wrote config file proxy/test-config.yaml for OPTIONS /api/users/filter/options DEBU[0042] received request GET /api/users/filter/options from client [::1]:56692 DEBU[0042] invoking upstream https://test with GET /api/users/filter/options [body: 0 bytes] DEBU[0044] upstream responded to GET https://test/api/users/filter/options with status 304 [body 0 bytes] DEBU[0044] wrote response [status: 304, body 0 bytes] to client [::1]:56692 INFO[0044] proxied GET /api/users/filter/options to upstream [status: 304, body 0 bytes] for client [::1]:56692 in 1.912330625s DEBU[0044] reusing identical response file proxy/api/users/1/OPTIONS-edit.txt for GET /api/users/filter/options DEBU[0044] wrote config file proxy/test-config.yaml for GET /api/users/filter/options DEBU[0044] upstream responded to GET https://test/api/users/1/edit with status 200 [body 386 bytes] DEBU[0044] wrote response [status: 200, body 386 bytes] to client [::1]:56695 INFO[0044] proxied GET /api/users/1/edit to upstream [status: 200, body 386 bytes] for client [::1]:56695 in 2.169881167s DEBU[0044] received request GET /api/users/1/edit from client [::1]:56692 DEBU[0044] invoking upstream https://test with GET /api/users/1/edit [body: 0 bytes] DEBU[0044] wrote response file proxy/api/users/1/GET-edit.json for GET /api/users/1/edit [386 bytes] DEBU[0044] wrote config file proxy/test-config.yaml for GET /api/users/1/edit DEBU[0045] upstream responded to GET https://test/api/users?page=1&size=10 with status 304 [body 0 bytes] DEBU[0045] wrote response [status: 304, body 0 bytes] to client [::1]:56694 INFO[0045] proxied GET /api/users?page=1&size=10 to upstream [status: 304, body 0 bytes] for client [::1]:56694 in 2.569703875s DEBU[0045] reusing identical response file proxy/api/users/1/OPTIONS-edit.txt for GET /api/users?page=1&size=10 DEBU[0045] received request GET /api/users?page=1&size=10 from client [::1]:56695 DEBU[0045] invoking upstream https://test with GET /api/users [body: 0 bytes] DEBU[0045] wrote config file proxy/test-config.yaml for GET /api/users?page=1&size=10 DEBU[0045] upstream responded to GET https://test/api/users/1/edit with status 304 [body 0 bytes] DEBU[0045] wrote response [status: 304, body 0 bytes] to client [::1]:56692 INFO[0045] proxied GET /api/users/1/edit to upstream [status: 304, body 0 bytes] for client [::1]:56692 in 824.481ms DEBU[0045] skipping recording of duplicate request GET /api/users/1/edit DEBU[0046] upstream responded to GET https://test/api/users?page=1&size=10 with status 304 [body 0 bytes] DEBU[0046] wrote response [status: 304, body 0 bytes] to client [::1]:56695 INFO[0046] proxied GET /api/users?page=1&size=10 to upstream [status: 304, body 0 bytes] for client [::1]:56695 in 1.019399916s DEBU[0046] skipping recording of duplicate request GET /api/users?page=1&size=10

sobchenyuk avatar Dec 13 '22 11:12 sobchenyuk

Hi @sobchenyuk, thank you for the bug report.

Would you be able to share the postman config/files for this so I can reproduce this? If possible (though appreciate it might not be) could you also share an example of the expected responses codes and response body from the https://test endpoint?

outofcoffee avatar Jan 01 '23 01:01 outofcoffee