我正在使用需要PUTHTTP服务器上的文件的应用程序.我使用Nginx作为服务器,但收到405 Not Allowed错误.以下是使用cURL进行测试的示例:
curl -X PUT \
-H 'Content-Type: application/x-mpegurl' \
-d /Volumes/Extra/playlist.m3u8 http://xyz.com
Run Code Online (Sandbox Code Playgroud)
我从Nginx那里得到了什么:
<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.1.19</center>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我需要做什么才能允许PUT?
任何线索都会很棒!
天真使用内置设置有时会导致挂起连接.这可能是我无法控制的网络问题.
我想知道如何为下载工件和发布工件设置超时和重试.
我找到了HTTP旅行车的连接超时和读取超时设置,但我还没有找到重试选项.
对于发布,我找到了重试选项,但没有超时设置.
编辑我想要的是相当于curl的--max-time, - retry和--retry-delay选项,用于maven和gradle下载和发布.
我知道launch4j没有捆绑JRE,.exe但你必须把它放在旁边.我的问题是,我该怎么做?有没有办法让maven自动定位和复制我用来构建我的应用程序并将其复制到给定目录的JDK的JRE?
我尝试过这样的事情:
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/windows/jre</outputDirectory>
<resources>
<resource>
<directory>${java.home}</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
但程序没有启动.它显示了一个立即消失的小对话框(它似乎是空白的,但它让我真的注意到它太快了).