Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are there hardcoded HTTP errors in gutils/giofile.c? #3901

Open
ctrlcctrlv opened this issue Aug 27, 2019 · 1 comment
Open

Why are there hardcoded HTTP errors in gutils/giofile.c? #3901

ctrlcctrlv opened this issue Aug 27, 2019 · 1 comment

Comments

@ctrlcctrlv
Copy link
Member

HTTP was apparently removed in 504549c.

Yet as of efb1bd1:

/* the initial space is so that these guys will come first in ordered error */
/* lists in the file chooser */
static unichar_t err401[] = { ' ','U','n','a','u','t','h','o','r','i','z','e','d', '\0' };
static unichar_t err403[] = { ' ','F','o','r','b','i','d','d','e','n', '\0' };
static unichar_t err404[] = { ' ','N','o','t',' ','F','o','u','n','d', '\0' };
static unichar_t err405[] = { ' ','M','e','t','h','o','d',' ','N','o','t',' ','A','l','l','o','w','e','d', '\0' };
static unichar_t err406[] = { ' ','N','o','t',' ','A','c','c','e','p','t','a','b','l','e', '\0' };
static unichar_t err409[] = { ' ','C','o','n','f','l','i','c','t', '\0' };
static unichar_t err412[] = { ' ','P','r','e','c','o','n','d','i','t','i','o','n',' ','F','a','i','l','e','d', '\0' };
static unichar_t err414[] = { ' ','R','e','q','u','e','s','t','-','U','R','I',' ','T','o','o',' ','L','o','n','g', '\0' };
static unichar_t err500[] = { ' ','I','n','t','e','r','n','a','l',' ','S','e','r','v','e','r',' ','E','r','r','o','r', '\0' };

These are all HTTP errors, I think they should be removed.

@jtanx
Copy link
Contributor

jtanx commented Aug 27, 2019

They are used to map errno error codes to error strings. I guess you could remove it if you really wanted to, and it'd be pretty simple to do - remove return_code and use strerror to get the error text. But that's effort, so PRs welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants