[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Popcon-developers] HTTP POST support and popcon



[Bill Allombert]
> Could you try the attached popcon-upload file ?
> This one read the answer from the CGI script and check for
> the string "DEBIAN POPCON HTTP-POST OK".
> If the string is not found, it report an error.
>
> This is safe, but maybe you have a better idea ?

The code looks fairly good to me.  A few comments:

 - Is there an existing perl module we could use for the HTTP
   communication?  I'm not sure we want an extra dependency, but we
   should consider it if we didn't have to add a dependency to get
   access to a library handling this.

 - There is no timeout.  I tried to run the script now, it got stuck.
   I believe it is because of network problems getting to
   popcon.debian.org.  The script should try for some seconds, and
   then give up.  I suggest using a simple timer.

 - The content type used do not mention the compression used, nor that
   this is in fact a plan text file.  I suggest using 

     Content-Encoding: x-gzip
     Content-Type: text/plain; charset=utf-8

   to document that the content is compressed text.  I guess the
   current charset used is ASCII, but specifying utf-8 will be forward
   compatible. :)

 - The file name and popcon host should be fetched from the
   configuration files used to specify this, or perhaps we should
   specify it as a command line argument?

> Sorry it took so long, but there was a stupid bug, and after that
> gluck went down and I could not test anymore.

Nothing to ask forgiveness for.  We can only do our best. :)



Reply to: