skeeto / impatient-mode

Impatient html mode. See your changes in the browser as you type
215 stars 19 forks source link

return of "403 forbidden" when opening multiple files with same base name #18

Open titaniumbones opened 5 years ago

titaniumbones commented 5 years ago

Using recent git versions of emacs, impatient-mode, and simple-httpd, I am seeing the "403 forbidden" errors that used to be common when users enabled impatient-mode for more than one index.html or style.css file at a time. My impression is that this has to do with the inperpretation of / characters in buffer names with uniquify-buffer-names set to "forward".

Setting uniquify-buffer-names to 'reverse seems to be a functional workaround, but I haven't tested it extensively yet.

It's not clear to me how to actually fix the issue, though. IIUC path names are set in both httpd/imp/live and http/imp/buffer, and the relationship between html files and their assets is set with imp-related-files. I experimented a bit but ended up with a mess; some notes are in https://github.com/netguy204/imp.el/issues/33#issuecomment-455400489.

Thanks for this super-important piece of infrastructure!

titaniumbones commented 5 years ago

(also not clear to me why more people don't have the same issue -- I don't immediately see anything in my setup that should be causing this).