Fixes for value search
Signed-off-by: tyrolyean <tyrolyean@tyrolyean.net>
This commit is contained in:
parent
646517cc97
commit
238d7d187c
2 changed files with 2 additions and 0 deletions
|
@ -44,6 +44,7 @@ struct email_t mail_from_text(char* message, size_t length){
|
||||||
mail.is_multipart = false;
|
mail.is_multipart = false;
|
||||||
return mail;
|
return mail;
|
||||||
}else{
|
}else{
|
||||||
|
printf("Content Type set: %.*s",15, cont_type);
|
||||||
size_t value_length = 0;
|
size_t value_length = 0;
|
||||||
char * mime_type = get_value_from_key(&value_length,
|
char * mime_type = get_value_from_key(&value_length,
|
||||||
cont_type - mail.message, &mail);
|
cont_type - mail.message, &mail);
|
||||||
|
|
|
@ -85,6 +85,7 @@ char* get_value_from_key(size_t* val_len, size_t key_offset,
|
||||||
for(size_t i = key_offset; i < mail->header_len; i++){
|
for(size_t i = key_offset; i < mail->header_len; i++){
|
||||||
if(mail->message[i] == ':'){
|
if(mail->message[i] == ':'){
|
||||||
colon = i;
|
colon = i;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue