summaryrefslogtreecommitdiff
path: root/src/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'src/proxy')
-rwxr-xr-xsrc/proxy/proxystrings.h2
-rw-r--r--src/proxy/proxytrack.c8
-rw-r--r--src/proxy/proxytrack.h8
-rw-r--r--src/proxy/store.c22
-rw-r--r--src/proxy/store.h8
5 files changed, 24 insertions, 24 deletions
diff --git a/src/proxy/proxystrings.h b/src/proxy/proxystrings.h
index 84c4693..23456a7 100755
--- a/src/proxy/proxystrings.h
+++ b/src/proxy/proxystrings.h
@@ -58,7 +58,7 @@ static void unescapehttp(const char* s, String* tempo) {
i++;
hc = (char) ehex(s+i);
StringAddchar(*tempo, (char) hc);
- i++; // sauter 2 caractères finalement
+ i++; // sauter 2 caractères finalement
}
else if (s[i]=='+') {
StringAddchar(*tempo, ' ');
diff --git a/src/proxy/proxytrack.c b/src/proxy/proxytrack.c
index 82bf7b1..02c18d0 100644
--- a/src/proxy/proxytrack.c
+++ b/src/proxy/proxytrack.c
@@ -131,7 +131,7 @@ Remark: If no cache newer than the added one is found, all entries can be added
/* Network base */
#include "htsbasenet.h"
-/* définitions globales */
+/* définitions globales */
#include "htsglobal.h"
/* htsweb */
@@ -186,7 +186,7 @@ static int linputsoc(T_SOC soc, char* s, int max) {
switch(c) {
case 13: break; // sauter CR
case 10: c=-1; break;
- case 9: case 12: break; // sauter ces caractères
+ case 9: case 12: break; // sauter ces caractères
default: s[j++]=(char) c; break;
}
}
@@ -521,7 +521,7 @@ static time_t get_time_rfc822(const char* s) {
str[i] = s[i];
}
str[i] = 0;
- /* éliminer :,- */
+ /* éliminer :,- */
while( (a=strchr(str,'-')) ) *a=' ';
while( (a=strchr(str,':')) ) *a=' ';
while( (a=strchr(str,',')) ) *a=' ';
@@ -530,7 +530,7 @@ static time_t get_time_rfc822(const char* s) {
while(*a) {
char *first,*last;
char tok[256];
- /* découper mot */
+ /* découper mot */
while(*a==' ') a++; /* sauter espaces */
first=a;
while((*a) && (*a!=' ')) a++;
diff --git a/src/proxy/proxytrack.h b/src/proxy/proxytrack.h
index 5254924..02521f0 100644
--- a/src/proxy/proxytrack.h
+++ b/src/proxy/proxytrack.h
@@ -142,7 +142,7 @@ static int linput(FILE* fp,char* s,int max) {
switch(c) {
case 13: break; // sauter CR
case 10: c=-1; break;
- case 0: case 9: case 12: break; // sauter ces caractères
+ case 0: case 9: case 12: break; // sauter ces caractères
default: s[j++]=(char) c; break;
}
}
@@ -229,7 +229,7 @@ static int linput_trim(FILE* fp,char* s,int max) {
// sauter espaces et tabs en fin
while( (rlen>0) && is_realspace(ls[max(rlen-1,0)]) )
ls[--rlen]='\0';
- // sauter espaces en début
+ // sauter espaces en début
a=ls;
while((rlen>0) && ((*a==' ') || (*a=='\t'))) {
a++;
@@ -284,7 +284,7 @@ static struct tm* convert_time_rfc822(struct tm *result,const char* s) {
return NULL;
strcpy(str,s);
set_lowcase(str);
- /* éliminer :,- */
+ /* éliminer :,- */
while( (a=strchr(str,'-')) ) *a=' ';
while( (a=strchr(str,':')) ) *a=' ';
while( (a=strchr(str,',')) ) *a=' ';
@@ -293,7 +293,7 @@ static struct tm* convert_time_rfc822(struct tm *result,const char* s) {
while(*a) {
char *first, *last;
char tok[256];
- /* découper mot */
+ /* découper mot */
while(*a==' ') a++; /* sauter espaces */
first=a;
while((*a) && (*a!=' ')) a++;
diff --git a/src/proxy/store.c b/src/proxy/store.c
index d63c1f2..810fb29 100644
--- a/src/proxy/store.c
+++ b/src/proxy/store.c
@@ -1079,7 +1079,7 @@ static PT_Element PT_ReadCache__New_u(PT_Index index_, const char* url, int flag
if (r->msg[0] == '\0') {
strcpy(r->msg,"Cache Read Error : Unexpected error");
}
- } else { // lire en mémoire
+ } else { // lire en mémoire
if (!dataincache) {
/* Read in memory from cache */
@@ -1128,7 +1128,7 @@ static PT_Element PT_ReadCache__New_u(PT_Index index_, const char* url, int flag
}
}
}
- } // si save==null, ne rien charger (juste en tête)
+ } // si save==null, ne rien charger (juste en tête)
} else {
r->statuscode=STATUSCODE_INVALID;
strcpy(r->msg,"Cache Read Error : Read Header Data");
@@ -1403,7 +1403,7 @@ static int PT_LoadCache__Old(PT_Index index_, const char *filename) {
free(use);
use=NULL;
}
- } else { // non supporté
+ } else { // non supporté
// fspc(opt->errlog,"error"); fprintf(opt->errlog,"Cache: %s not supported, ignoring current cache"LF,firstline);
fclose(cache->dat);
cache->dat=NULL;
@@ -1597,13 +1597,13 @@ static PT_Element PT_ReadCache__Old_u(PT_Index index_, const char* url, int flag
}
//
cache_rstr(cache->dat,check);
- if (strcmp(check,"HTS")==0) { /* intégrité OK */
+ if (strcmp(check,"HTS")==0) { /* intégrité OK */
ok=1;
}
- cache_rLLint(cache->dat, &size_read); /* lire size pour être sûr de la taille déclarée (réécrire) */
+ cache_rLLint(cache->dat, &size_read); /* lire size pour être sûr de la taille déclarée (réécrire) */
if (size_read > 0) { /* si inscrite ici */
r->size = size_read;
- } else { /* pas de données directement dans le cache, fichier présent? */
+ } else { /* pas de données directement dans le cache, fichier présent? */
r->size = 0;
}
}
@@ -1852,11 +1852,11 @@ static time_t getArcTimestamp(const char * const line) {
struct tm tm;
memset(&tm, 0, sizeof(tm));
tm.tm_year = getDigit4(pos + 0) - 1900; /* current year minus 1900 */
- tm.tm_mon = getDigit2(pos + 4) - 1; /* 0 – 11 */
- tm.tm_mday = getDigit2(pos + 6); /* 1 – 31 */
- tm.tm_hour = getDigit2(pos + 8); /* 0 – 23 */
- tm.tm_min = getDigit2(pos + 10); /* 0 – 59 */
- tm.tm_sec = getDigit2(pos + 12); /* 0 – 59 */
+ tm.tm_mon = getDigit2(pos + 4) - 1; /* 0 – 11 */
+ tm.tm_mday = getDigit2(pos + 6); /* 1 – 31 */
+ tm.tm_hour = getDigit2(pos + 8); /* 0 – 23 */
+ tm.tm_min = getDigit2(pos + 10); /* 0 – 59 */
+ tm.tm_sec = getDigit2(pos + 12); /* 0 – 59 */
tm.tm_isdst = 0;
return getGMT(&tm);
}
diff --git a/src/proxy/store.h b/src/proxy/store.h
index 64c0194..b8fd4db 100644
--- a/src/proxy/store.h
+++ b/src/proxy/store.h
@@ -53,16 +53,16 @@ typedef struct _PT_Element {
int indexId; // index identifier, if suitable (!= -1)
//
int statuscode; // status-code, -1=erreur, 200=OK,201=..etc (cf RFC1945)
- char* adr; // adresse du bloc de mémoire, NULL=vide
- char* headers; // adresse des en têtes si présents (RFC822 format)
+ char* adr; // adresse du bloc de mémoire, NULL=vide
+ char* headers; // adresse des en têtes si présents (RFC822 format)
size_t size; // taille fichier
char msg[1024]; // error message ("\0"=undefined)
char contenttype[64]; // content-type ("text/html" par exemple)
char charset[64]; // charset ("iso-8859-1" par exemple)
- char* location; // on copie dedans éventuellement la véritable 'location'
+ char* location; // on copie dedans éventuellement la véritable 'location'
char lastmodified[64]; // Last-Modified
char etag[64]; // Etag
- char cdispo[256]; // Content-Disposition coupé
+ char cdispo[256]; // Content-Disposition coupé
} _PT_Element;
typedef struct _PT_Element *PT_Element;