0

我正在使用 ngrok 转发到网络服务器,并且我希望能够将文件上传到它。运行curl <my_ngrok_subdomain>.com --upload-file test.txtcurl 似乎可以成功上传,但是我不确定它为什么返回 404:

这是非冗长的,这让我认为它是成功的:

$ curl  blahblahblah.ngrok.io --upload-file test.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    49  100    35  100    14     30     12  0:00:01  0:00:01 --:--:--    42
Tunnel blahblahblah.ngrok.io not found

所以看起来文件正在成功上传,但是这里是启用了详细信息的 curl,这让我不确定......

$curl --verbose blahblahblah.ngrok.io --upload-file test.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying XX.XX.XX.XX...
* TCP_NODELAY set
* Connected to blahblahblah.ngrok.io (XX.XX.XX.XX) port 80 (#0)
> PUT /test.txt HTTP/1.1
> Host: blahblahblah.ngrok.io
> User-Agent: curl/7.58.0
> Accept: */*
> Content-Length: 14
> Expect: 100-continue
> 
* Done waiting for 100-continue
  0    14    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0} [14 bytes data]
* We are completely uploaded and fine
< HTTP/1.1 404 Not Found
< Content-Length: 35
< Content-Type: text/plain
< 
{ [35 bytes data]
100    49  100    35  100    14     30     12  0:00:01  0:00:01 --:--:--    42
* Connection #0 to blahblahblah.ngrok.io left intact
Tunnel blahblahblah.ngrok.io not found.

尽管返回 404,curl 上传是否有可能成功?

4

0 回答 0