GithubHelp home page GithubHelp logo

Comments (11)

u0nel avatar u0nel commented on June 18, 2024 1

I changed that, now it returns 204 and micropublish.net works. micropub.rocks allows 201, so that needs to be changed.

from micropublish.

barryf avatar barryf commented on June 18, 2024

Thanks for the report, @ulpaulpa. What was the error message you received? Did you get any information in the request to your Micropub server that may help us debug?

from micropublish.

u0nel avatar u0nel commented on June 18, 2024

The server didn't return any error message and the post was deleted, but micropublish said there was an error.

from micropublish.

u0nel avatar u0nel commented on June 18, 2024

There was an error making a request to your Micropub endpoint. The error received was:
That's the error message. (nothing behind the colon)

from micropublish.

barryf avatar barryf commented on June 18, 2024

I had a look at the logs and this may be the culprit.

The URL that's being passed is <class 'str'> https://ulpaulpa.de/p/testtest-1 which is invalid.

from micropublish.

u0nel avatar u0nel commented on June 18, 2024

I wanted to ask that too, but that's when creating posts. When I'm deleting a post the post gets deleted, but micropublish says there was an error

from micropublish.

barryf avatar barryf commented on June 18, 2024

I've found a few error responses from your server.

At 15:21 UTC there was no message but I note the URL https://ulpaulpa.de/p/-3/ is currently 403 Forbidden.

15:16 UTC:

<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

11:39 UTC:

File "/home/ulpa/blog/micropub-server/write.py", line 94, in <module>
    os.remove("/home/ulpa/html/"+path+"/index.html")
FileNotFoundError: [Errno 2] No such file or directory: '/home/ulpa/html/p/sluggy/index.html'

from micropublish.

u0nel avatar u0nel commented on June 18, 2024
  1. I deleted it (the folder still exists, the index.html file not)
  2. I forgot to restart the server
  3. I tried to redelete the post, because of the error message.

from micropublish.

barryf avatar barryf commented on June 18, 2024

I think I've found it. For a delete Micropublish is expecting a 200 or 204 but as you stated at the top you're returning a 201 with a Location. Is there a reason you want to specify a Location when deleting?

from micropublish.

u0nel avatar u0nel commented on June 18, 2024

No, but I return 201 for all successful post requests and I don't want to add an exception just for deletes as its allowed: https://www.w3.org/TR/micropub/#response-2

from micropublish.

barryf avatar barryf commented on June 18, 2024

Micropublish accepts 201s for an undelete but not a delete. I think that paragraph in the spec could have been a little clearer, but the key part is "Otherwise, the server must respond with 200 or 204."

from micropublish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.