217 |
|
|
218 |
} |
} |
219 |
|
|
220 |
|
|
221 |
|
/** |
222 |
|
* Return TRUE if the string <i>a</i> starts with the string <i>b</i>. |
223 |
|
* @param a The string to search for b in |
224 |
|
* @param b The sub-string to test a against |
225 |
|
* @return TRUE if a starts with b, otherwise FALSE |
226 |
|
*/ |
227 |
|
int starts_with(char *a, char *b) { |
228 |
|
|
229 |
|
if((!a || !b) || *a!=*b) return FALSE; |
230 |
|
|
231 |
|
while(*a && *b) { |
232 |
|
|
233 |
|
if(*a++ != *b++) return FALSE; |
234 |
|
|
235 |
|
} |
236 |
|
|
237 |
|
return TRUE; |
238 |
|
|
239 |
|
} |
240 |
|
|
241 |
|
|
242 |
/** |
/** |
243 |
* Exchanges \escape sequences in a string |
* Exchanges \escape sequences in a string |
244 |
* @param s A string |
* @param s A string |
296 |
|
|
297 |
} |
} |
298 |
|
|
299 |
|
|
300 |
/** |
/** |
301 |
* @param name A process name as stated in the config file |
* @param name A process name as stated in the config file |
302 |
* @return the named process or NULL of not found |
* @return the named process or NULL of not found |
921 |
|
|
922 |
/** |
/** |
923 |
* @return a Basic Authentication Authorization string (RFC 2617), |
* @return a Basic Authentication Authorization string (RFC 2617), |
924 |
* with credentials from the Run object, NULL if credentials are not |
* with credentials from the Run object, The string "\r\n" if |
925 |
* defined. |
* credentials are not defined. |
926 |
*/ |
*/ |
927 |
char *get_basic_authentication_header() { |
char *get_basic_authentication_header() { |
928 |
|
|
941 |
|
|
942 |
} |
} |
943 |
|
|
944 |
return NULL; |
return xstrdup("\r\n"); |
945 |
|
|
946 |
} |
} |
947 |
|
|