On 01-Jun-2018, Alexandre Viau wrote:

> I am building a service that accepts uploads via dput.

Thank you for working on this service.

I assume this is a service that emulates the Debian archive queue
server?

> My service does a number of checks when it receives uploads.
> For example, it only accepts source uploads.

This is an interesting idea, and I hope you are (working toward)
proposing it as improvements to the official Debian servers.

> If you upload a .deb, my service returns a 400 error with a message:
>  - "Only source uploads are accepted"
> Or:
>  - "this file was signed with an unrecognized key"
> Etc...

Because the server API is via HTTP, you have the full range of
HTTP status responses, standardised in the protocol. See
<URL:http://en.wikipedia.org/wiki/List_of_HTTP_status_codes>
(more fun at <URL:https://httpstatusdogs.com/510-not-extended>, where
you can see the standard meaning of each code by following the link
from the status code).

> I would love it if these messages made it to the user!

Because DPut is primarily intended as a client to the Debian archive
upload queue, I think it should not have special treatment for other
servers.

If the Debian upload queue is not sending those messages, I think it's
too soon to be making code branches in DPut to handle those. There is
enough poorly-specified behaviour already handled in DPut, we don't
need to add code paths for features that are not yet exhibited by
Debian :-)

Rather, these checks and specific HTTP responses are good to propose
as (one or more) improvements for the official Debian upload queue
server software. I look forward to seeing that progress!

-- 
 \        “Humanity has advanced, when it has advanced, not because it |
  `\     has been sober, responsible, and cautious, but because it has |
_o__)            been playful, rebellious, and immature.” —Tom Robbins |
Ben Finney <b...@benfinney.id.au>

Attachment: signature.asc
Description: PGP signature

Reply via email to