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

Re: smart upload server



Hello again,

I've done some work on server and i'm asking you for comments/hints/etc. again..

Right now I'm using HTTP PUT for everything, with commands expected in signed .commands file.

Directory (for delayed etc.) is specified by url, filename too.

Before file upload I check meta:

1) Directory: i think there will be some file_root in config and url directory must be present
within this root. Without directory specified file will be going into this file_root.

2) Filename: can't be empty.

3) Content-length: header check but I'm not sure about the limits yet.

4) Expected file: Files which are not signed have to be in .changes file in the same directory,
    .changes mtime has to be lower then set time window.

Then file is uploaded into some tempdir and content is checked:

1.a) Sign: verify sign for .changes, .commands

1.b) Checksum: for other files

2) Other checks - litian, package version etc.

When it passes, it's moved to specified destination.

Status is returned via HTTP codes, 200 - OK, 40x for errors with proper message.

This is it right now.

Thanks, Peter

Reply to: