{"action":"opened","issue":{"url":"https://api.github.com/repos/processone/ejabberd/issues/820","labels_url":"https://api.github.com/repos/processone/ejabberd/issues/820/labels{/name}","comments_url":"https://api.github.com/repos/processone/ejabberd/issues/820/comments","events_url":"https://api.github.com/repos/processone/ejabberd/issues/820/events","html_url":"https://github.com/processone/ejabberd/issues/820","id":115135769,"number":820,"title":"mod_http_upload Potential PUT_URL bug","user":{"login":"SafwatHalaby","id":5030488,"avatar_url":"https://avatars.githubusercontent.com/u/5030488?v=3","gravatar_id":"","url":"https://api.github.com/users/SafwatHalaby","html_url":"https://github.com/SafwatHalaby","followers_url":"https://api.github.com/users/SafwatHalaby/followers","following_url":"https://api.github.com/users/SafwatHalaby/following{/other_user}","gists_url":"https://api.github.com/users/SafwatHalaby/gists{/gist_id}","starred_url":"https://api.github.com/users/SafwatHalaby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SafwatHalaby/subscriptions","organizations_url":"https://api.github.com/users/SafwatHalaby/orgs","repos_url":"https://api.github.com/users/SafwatHalaby/repos","events_url":"https://api.github.com/users/SafwatHalaby/events{/privacy}","received_events_url":"https://api.github.com/users/SafwatHalaby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-04T20:04:30Z","updated_at":"2015-11-04T20:04:30Z","closed_at":null,"body":"With the following configuration, http file uploads fail:\r\n\r\nnginx:\r\n```\r\n\tserver {\r\n\t    listen *:443 ssl;\r\n            ...Irrelevant things here...\r\n\r\n            root /home/www/;\r\n\t    \r\n\t    client_max_body_size 12m;\r\n\t    location / {\r\n\t        # Pass all requests to ejabberd, except for GET and HEAD requests.\r\n\t        limit_except GET HEAD { \r\n\t            proxy_pass http://localhost:5444;\r\n\t        }\r\n\t        proxy_set_header Host $host;\r\n\t\r\n\t        if ($request_method = GET) {\r\n\t            add_header X-Frame-Options DENY;\r\n\t        }\r\n\t    }\r\n```\r\n\r\nEjabberd:\r\n```\r\n    docroot: \"/home/www/xmpp\"\r\n    put_url: \"https://<truncated>.com:443/xmpp/\"\r\n    get_url: \"https://<truncated>.com:443/xmpp/\"\r\n```\r\n\r\nHowever, changing the `put_url` line to the following makes it all works fine:\r\n```\r\nput_url: \"https://<truncated>.com:443/\"\r\n```\r\n\r\nMy guess is that with the first scenario, ejabbered attempted to use `/home/www/xmpp/xmpp/`.\r\nThis is either a bug or vague documentation. According to the docs:\r\n> Uploaded files are stored below the directory specified (as an absolute\r\n  path) with this option.  The keyword @HOME@ is replaced with the home\r\n  directory of the user running ejabberd.\r\n\r\nIn other words, I would have expected that the `put_url` and `get_url` parameters have no effect at all on where the file is stored. Even `put_url: \"https://<truncated>.com:443/osakcsa/ckjzc/\"` should work."}}