Post 烧瓶/ShinyProxy中的文件上载

Post 烧瓶/ShinyProxy中的文件上载,post,flask,shinyproxy,Post,Flask,Shinyproxy,当直接执行应用程序时,通过my Flask应用程序中的form/POST请求上传文件效果良好,但当Shinyproxy托管Flask应用程序时,上传文件失败。我一直跟踪到Shinyproxy没有正确执行表单POST请求: app.py: index.html: 在Shinyproxy中通过 Dockerfile 返回相同的,但不包含POST行: 172.17.0.1 - - [23/Dec/2019 14:39:42] "GET / HTTP/1.1" 200 - shinyproxy.log

当直接执行应用程序时,通过my Flask应用程序中的form/POST请求上传文件效果良好,但当Shinyproxy托管Flask应用程序时,上传文件失败。我一直跟踪到Shinyproxy没有正确执行表单POST请求:

app.py:

index.html:

在Shinyproxy中通过

Dockerfile

返回相同的,但不包含POST行:

172.17.0.1 - - [23/Dec/2019 14:39:42] "GET / HTTP/1.1" 200 -
shinyproxy.log说

2019-12-23 14:42:33.682 DEBUG 17832 --- [XNIO-2 I/O-1] io.undertow.server.handlers.proxy        : Sent request ClientRequest{path='/', method=POST, protocol=HTTP/1.1} to target 10.81.71.42 for exchange HttpServerExchange{ POST /proxy_endp
oint/b933863e-9fad-4d00-a657-034ede313e34/ request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9], Accept-Language=[de-DE,de;q=0.9,en-US;q=0.8,en;q=0.
7], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], Origin=[http://192.168.76.81:8080], User-Agent=[Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36], Connectio
n=[keep-alive], Content-Length=[188], Content-Type=[multipart/form-data; boundary=----WebKitFormBoundarymPv6WtCTpGZQqRbF], Cookie=[JSESSIONID=CZxjGBM7BW597wysbBABgNWZL2x7qvsfujWVERgR], Referer=[http://192.168.76.81:8080/app_direct/flask_t
est/], Upgrade-Insecure-Requests=[1], Host=[192.168.76.81:8080]} response {Expires=[0], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], X-XSS-Protection=[1; mode=block], X-Content-Type-Options=[nosniff], Pragma=[no-cache]}
}                                                                                                                                                                                                                                             
2019-12-23 14:42:33.683 DEBUG 17832 --- [XNIO-2 I/O-1] io.undertow.request.io                   : Fixed length stream closed with with 188 bytes remaining                                                                                    
2019-12-23 14:42:33.683 DEBUG 17832 --- [XNIO-2 I/O-1] i.u.client.http.HttpClientExchange       : request terminated for request to localhost/127.0.0.1:20000 /                                                                               
2019-12-23 14:42:33.683 ERROR 17832 --- [XNIO-2 I/O-1] io.undertow.proxy                        : UT005028: Proxy request to /proxy_endpoint/b933863e-9fad-4d00-a657-034ede313e34/ failed                                                     

io.undertow.server.TruncatedResponseException: null                                             
有人知道我如何在shinyproxy(或其他)中托管此应用程序吗?我想让并发用户能够上传文件,而不使用相同的docker容器/不相互干扰

谢谢和亲切的问候


shosaco是Shinyproxy 2.2.0和2.3.0中的一个bug。恢复到ShinyProxy 2.1.0解决了此问题,请参阅

10.81.71.42 - - [23/Dec/2019 14:37:28] "GET / HTTP/1.1" 200 -
10.81.71.42 - - [23/Dec/2019 14:37:30] "POST / HTTP/1.1" 200 -
FROM python:3
RUN pip install flask werkzeug
RUN mkdir /templates
COPY ["index.html", "/templates"]
COPY app.py /
EXPOSE 3838
CMD ["python", "app.py"]
172.17.0.1 - - [23/Dec/2019 14:39:42] "GET / HTTP/1.1" 200 -
2019-12-23 14:42:33.682 DEBUG 17832 --- [XNIO-2 I/O-1] io.undertow.server.handlers.proxy        : Sent request ClientRequest{path='/', method=POST, protocol=HTTP/1.1} to target 10.81.71.42 for exchange HttpServerExchange{ POST /proxy_endp
oint/b933863e-9fad-4d00-a657-034ede313e34/ request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9], Accept-Language=[de-DE,de;q=0.9,en-US;q=0.8,en;q=0.
7], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], Origin=[http://192.168.76.81:8080], User-Agent=[Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36], Connectio
n=[keep-alive], Content-Length=[188], Content-Type=[multipart/form-data; boundary=----WebKitFormBoundarymPv6WtCTpGZQqRbF], Cookie=[JSESSIONID=CZxjGBM7BW597wysbBABgNWZL2x7qvsfujWVERgR], Referer=[http://192.168.76.81:8080/app_direct/flask_t
est/], Upgrade-Insecure-Requests=[1], Host=[192.168.76.81:8080]} response {Expires=[0], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], X-XSS-Protection=[1; mode=block], X-Content-Type-Options=[nosniff], Pragma=[no-cache]}
}                                                                                                                                                                                                                                             
2019-12-23 14:42:33.683 DEBUG 17832 --- [XNIO-2 I/O-1] io.undertow.request.io                   : Fixed length stream closed with with 188 bytes remaining                                                                                    
2019-12-23 14:42:33.683 DEBUG 17832 --- [XNIO-2 I/O-1] i.u.client.http.HttpClientExchange       : request terminated for request to localhost/127.0.0.1:20000 /                                                                               
2019-12-23 14:42:33.683 ERROR 17832 --- [XNIO-2 I/O-1] io.undertow.proxy                        : UT005028: Proxy request to /proxy_endpoint/b933863e-9fad-4d00-a657-034ede313e34/ failed                                                     

io.undertow.server.TruncatedResponseException: null