X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=blobdiff_plain;f=scheduler%2Fclient.c;h=2400b57fe5ddf34897dbfceeb48b464b4ec2d681;hp=93fbf3419f7b6d2b722fbd2337fd003e2482ba74;hb=f8b3a85b79b8eb74c37c839079ecbf8266a6f4ed;hpb=41681883895f928191cfa6472b453d9753cc26ec diff --git a/scheduler/client.c b/scheduler/client.c index 93fbf3419..2400b57fe 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -3,7 +3,7 @@ * * Client routines for the Common UNIX Printing System (CUPS) scheduler. * - * Copyright 2007-2009 by Apple Inc. + * Copyright 2007-2010 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * This file contains Kerberos support code, copyright 2006 by @@ -1131,8 +1131,8 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ *ptr = '\0'; } else - snprintf(locale, sizeof(locale), "%s.%s", - con->http.fields[HTTP_FIELD_ACCEPT_LANGUAGE], DefaultCharset); + snprintf(locale, sizeof(locale), "%s.UTF-8", + con->http.fields[HTTP_FIELD_ACCEPT_LANGUAGE]); con->language = cupsLangGet(locale); } @@ -2192,6 +2192,15 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ return; } } + else if (filestats.st_size == 0) + { + /* + * Don't allow empty file... + */ + + unlink(con->filename); + cupsdClearString(&con->filename); + } if (con->command) {