You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Oliver Lietz (JIRA)" <ji...@apache.org> on 2017/02/09 11:16:41 UTC

[jira] [Resolved] (SLING-6448) Not able to upload file when sling running as war file using curl

     [ https://issues.apache.org/jira/browse/SLING-6448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Lietz resolved SLING-6448.
---------------------------------
    Resolution: Not A Problem

> Not able to upload file when sling running as war file using curl
> -----------------------------------------------------------------
>
>                 Key: SLING-6448
>                 URL: https://issues.apache.org/jira/browse/SLING-6448
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Builder 9
>         Environment: Windows, Apache 
>            Reporter: Ravi Singareddy
>
> Here are steps followed
> 1) Checked out code from svn
> svn co http://svn.apache.org/repos/asf/sling/trunk sling
> 2) cd sling
> 3) cd launchpad/builder
> 4) mvn --update-snapshots clean install
> 5) mvn jetty:run-war
> (please note I have add jetty dependency in pom.xml to run above command)
> I have used curl to upload file
> >> curl -u admin:admin http://localhost:8080/content/test.html --upload-file test.html
> is giving following error: PUT 405 Error
> d:\curl-7.52.1-win64-mingw\bin\curl.exe -u admin:admin http://localhost:8080/content/test.html --upload-file test.html
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html>
> <head>
> <title>405 Method PUT not supported</title>
> </head>
> <body>
> <h1>Method PUT not supported (405)</h1>
> <p>The requested URL /content/test.html resulted in an error in Apache Sling
>  Core Default Servlet.</p>
> <h3>Request Progress:</h3>
> <pre>
>       0 TIMER_START{Request Processing}
>       2 COMMENT timer_end format is {&lt;elapsed microseconds&gt;,&lt;timer name
> &gt;} &lt;optional message&gt;
>      10 LOG Method=PUT, PathInfo=null
>      21 TIMER_START{handleSecurity}
>    2418 TIMER_END{2395,handleSecurity} authenticator org.apache.sling.auth.core.
> impl.SlingAuthenticator@68556f8e returns true
>    3517 TIMER_START{ResourceResolution}
>    3925 TIMER_END{406,ResourceResolution} URI=/content/test.html resolves to
>  Resource=NonExistingResource, path=/content/test.html
>    3936 LOG Resource Path Info: SlingRequestPathInfo: path=&apos;/content/landin
> g.html&apos;, selectorString=&apos;null&apos;, extension=&apos;html&apos;, suf
> fix=&apos;null&apos;
>    3936 TIMER_START{ServletResolution}
>    3941 TIMER_START{resolveServlet(/content/test.html)}
>    4367 TIMER_END{423,resolveServlet(/content/test.html)} Using servlet Apac
> he Sling Core Default Servlet
>    4371 TIMER_END{434,ServletResolution} URI=/content/test.html handled by S
> ervlet=Apache Sling Core Default Servlet
>    4378 LOG Applying Requestfilters
>    4385 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
>    4392 LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTr
> ackerLogFilter
>    4397 LOG Applying Componentfilters
>    4409 TIMER_START{Apache Sling Core Default Servlet#0}
>    4425 LOG Applying Error filters
>    4428 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
>    4433 TIMER_START{handleError:status=405}
>    4577 TIMER_END{143,handleError:status=405} Using handler org.apache.sling.ser
> vlets.resolver.internal.defaults.DefaultErrorHandlerServlet
>    5111 TIMER_END{5109,Request Processing} Dumping SlingRequestProgressTracker E
> ntries
> </pre>
> <hr>
> <address>ApacheSling/2.6 (jetty/9.3.12.v20160915, Java HotSpot(TM) 64-Bit Server
>  VM 1.8.0_102, Windows 8 6.2 amd64)</address>
> </body>
> </html>
> _______________________________________________
> But If start sling using executable jar able to upload the file using curl.
> java -Xmx4g -Xms4g -Dsling.home=\var\sling -Dsling.run.modes=oak -jar target\org.apache.sling.launchpad-9-SNAPSHOT.jar start
> Thanks
> Ravi



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)