Free cookie consent management tool by TermsFeed Policy Generator

/dev/blog/ID10T

Advertisement

Fixing HTTP 405 errors with httpd 2.4 WebDAV

httpd, Webdav Comments

While updating an Apache httpd from 2.2 to 2.4 we encountered a strange problem. The web server is used as a reverse proxy for a WebDAV application. Therefore the original httpd 2.2 directive allowed a couple of WebDAV methods. It looked similarly to this:

<Location "/dav">
  <LimitExcept HEAD GET POST CONNECT PUT DELETE OPTIONS PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK TRACE>
    Order       deny,allow
    Allow       from all
  </LimitExcept>
</Location>

Adapting this to httpd 2.4 was not a big deal:

<Location "/dav">
  AllowMethods HEAD GET POST CONNECT PUT DELETE OPTIONS PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK TRACE
  Require all granted
</Location>

But this didn’t work as expected. While OPTIONS did work, PROPFIND, PROPPATCH, etc. were not. My tests with curl always returned HTTP 405.

curl -X PROPFIND https://example.org/dav
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>405 Method Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested method PROPFIND is not allowed for the URL /.</p>
</body></html>

As it turns out, there’s a bug report from 2013 in the Apache bug tracker for a similar issue. For whatever reason an enabled DirectoryIndex directive blocks the WebDAV methods. This bug has been fixed in the httpd 2.5 trunk, but not in http 2.4 (and probably never will). Therefore disabling DirectoryIndex is the mandatory workaround:

<Location "/dav">
  DirectoryIndex disabled
  AllowMethods HEAD GET POST CONNECT PUT DELETE OPTIONS PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK TRACE
  Require all granted
</Location>

As this issue didn’t arise until production hours and a quick fix was needed, I’ve yet to confirm if mod_dav and mod_dav_fs are even needed. I suspect they are not.

Using the Spotify Web player on Android

Android, Web Comments

Update September 2020: While these exact instructions don’t work anymore, there are solutions in the comments. So please read the comments as well until I found the time to test new ways and to update the post.

A friend of mine asked me if it was possible to use the Spotify Web Player on his Android smartphone.

Spotify Android App

If you are like me and don’t use Spotify on mobile very often, you might not know that the free version of the Spotify app is heavily castrated. I’m not using it a lot, but if I understood correctly, you can’t properly play a playlist or one song, you get force fed “matching” songs. Also you can’t constantly skip songs. To push their Premium Account to you, Spotify additionally prevents mobile browsers from using their less limited Web player.

While I understand that Spotify wants to earn money, I heavily dislike the artificial limitations to push people to a paying account. If you can’t sell your Premium Account with a feature list, you should probably work on the list instead of artificially limiting the features on different devices. Especially the differentiation between PC and mobile browsers triggered me. Therefore I welcomed the challenge of convincing Spotifys Web player to work on Android.

Ansible: Extend variable values in Jinja 2 templates

Ansible Comments
How to create loops in Jinja2 which propagate changes across scopes

How I miraculously fixed my Windows 10 startup DNS problems

Windows Comments

I once again had a great experience with Windows 10. For some reason my DNS resolution stopped working for roughly two minutes after every startup. Of course there was neither an update around that time, nor were there any unusual messages in the Event Viewer. Therefore I had no idea where to look. I tried a couple of things, manually setting different DNS servers, configuring a static IP, and of course doing the classic ipconfig /flushdns and ipconfig /registerdns. To no avail. I still did not have DNS directly after startup. The DNS issues even occured in the first two minutes of Safe Boot Mode.
So, how did I fix it?

Using Custom executables in Steam applications

Steam, Gaming Comments

Nearly 10 years ago, on the 30th December of 2009, I bought League of Legends on Steam. Back in this time, DOTA 2 wasn’t released yet and there was a Digital Collectors Edition for League available on Steam. Therefore, I’m one of the very few users who are playing League of Legends via Steam. But while the League of Legends client was further developed, the game version in Steam did not. Luckily, the small Steam League of Legends community found workarounds, so the tracking of ingame time still works. A couple of months ago, Riot Games, the company behind League of Legends did a major overhaul of the client, renaming the game launcher in the process. This, in connection with the workaround install of League of Legends in Steam lead to an popup message every time the game was started via Steam shortcut:

League of Legends Launcher Shortcut Popup

League of Legends will now update your desktop shortcuts. Your operating system may ask for Administrator permissions.

While I’m not playing League frequently anymore, this popup still annoyed me. As other players also encountered this problem and simply renaming the executables didn’t work, I did some tinkering and incidentally found a solution which probably enables the easy usage of custom executables for every Steam game.

Advertisement