Lines Matching full:form

191  * CURL_FORMADD_OPTION_TWICE   if one option is given twice for one Form
207 struct FormInfo *first_form, *current_form, *form = NULL; in FormAdd() local
364 form = AddFormInfo(fname, NULL, current_form); in FormAdd()
365 if(!form) { in FormAdd()
370 form->value_alloc = TRUE; in FormAdd()
371 current_form = form; in FormAdd()
372 form = NULL; in FormAdd()
435 accepted as a fine form part */ in FormAdd()
453 form = AddFormInfo(NULL, type, current_form); in FormAdd()
454 if(!form) { in FormAdd()
459 form->contenttype_alloc = TRUE; in FormAdd()
460 current_form = form; in FormAdd()
461 form = NULL; in FormAdd()
550 for(form = first_form; in FormAdd()
551 form != NULL; in FormAdd()
552 form = form->more) { in FormAdd()
553 if(((!form->name || !form->value) && !post) || in FormAdd()
554 ( (form->contentslength) && in FormAdd()
555 (form->flags & HTTPPOST_FILENAME) ) || in FormAdd()
556 ( (form->flags & HTTPPOST_FILENAME) && in FormAdd()
557 (form->flags & HTTPPOST_PTRCONTENTS) ) || in FormAdd()
559 ( (!form->buffer) && in FormAdd()
560 (form->flags & HTTPPOST_BUFFER) && in FormAdd()
561 (form->flags & HTTPPOST_PTRBUFFER) ) || in FormAdd()
563 ( (form->flags & HTTPPOST_READFILE) && in FormAdd()
564 (form->flags & HTTPPOST_PTRCONTENTS) ) in FormAdd()
569 if(((form->flags & HTTPPOST_FILENAME) || in FormAdd()
570 (form->flags & HTTPPOST_BUFFER)) && in FormAdd()
571 !form->contenttype) { in FormAdd()
572 char *f = (form->flags & HTTPPOST_BUFFER)? in FormAdd()
573 form->showfilename : form->value; in FormAdd()
582 form->contenttype = strdup(type); in FormAdd()
583 if(!form->contenttype) { in FormAdd()
587 form->contenttype_alloc = TRUE; in FormAdd()
589 if(form->name && form->namelength) { in FormAdd()
592 for(i = 0; i < form->namelength; i++) in FormAdd()
593 if(!form->name[i]) { in FormAdd()
600 if(!(form->flags & HTTPPOST_PTRNAME) && in FormAdd()
601 (form == first_form) ) { in FormAdd()
602 /* Note that there's small risk that form->name is NULL here if the in FormAdd()
604 if(form->name) { in FormAdd()
606 form->name = Curl_memdup(form->name, form->namelength? in FormAdd()
607 form->namelength: in FormAdd()
608 strlen(form->name) + 1); in FormAdd()
610 if(!form->name) { in FormAdd()
614 form->name_alloc = TRUE; in FormAdd()
616 if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE | in FormAdd()
618 HTTPPOST_CALLBACK)) && form->value) { in FormAdd()
620 size_t clen = (size_t) form->contentslength; in FormAdd()
622 clen = strlen(form->value) + 1; in FormAdd()
624 form->value = Curl_memdup(form->value, clen); in FormAdd()
626 if(!form->value) { in FormAdd()
630 form->value_alloc = TRUE; in FormAdd()
632 post = AddHttpPost(form->name, form->namelength, in FormAdd()
633 form->value, form->contentslength, in FormAdd()
634 form->buffer, form->bufferlength, in FormAdd()
635 form->contenttype, form->flags, in FormAdd()
636 form->contentheader, form->showfilename, in FormAdd()
637 form->userp, in FormAdd()
646 if(form->contenttype) in FormAdd()
647 prevtype = form->contenttype; in FormAdd()
654 for(ptr = form; ptr != NULL; ptr = ptr->more) { in FormAdd()
712 int curl_formget(struct curl_httppost *form, void *arg, in curl_formget() argument
718 Curl_mime_initpart(&toppart, NULL); /* default form is empty */ in curl_formget()
719 result = Curl_getformdata(NULL, &toppart, form, NULL); in curl_formget()
721 result = Curl_mime_prepare_headers(&toppart, "multipart/form-data", in curl_formget()
743 * curl_formfree() is an external function to free up a whole form post
746 void curl_formfree(struct curl_httppost *form) in curl_formfree() argument
750 if(!form) in curl_formfree()
751 /* no form to free, just get out of this */ in curl_formfree()
755 next = form->next; /* the following form line */ in curl_formfree()
758 curl_formfree(form->more); in curl_formfree()
760 if(!(form->flags & HTTPPOST_PTRNAME)) in curl_formfree()
761 free(form->name); /* free the name */ in curl_formfree()
762 if(!(form->flags & in curl_formfree()
765 free(form->contents); /* free the contents */ in curl_formfree()
766 free(form->contenttype); /* free the content type */ in curl_formfree()
767 free(form->showfilename); /* free the faked file name */ in curl_formfree()
768 free(form); /* free the struct */ in curl_formfree()
769 form = next; in curl_formfree()
770 } while(form); /* continue */ in curl_formfree()
808 curl_mime *form = NULL; in Curl_getformdata() local
812 Curl_mime_cleanpart(finalform); /* default form is empty */ in Curl_getformdata()
817 form = curl_mime_init(data); in Curl_getformdata()
818 if(!form) in Curl_getformdata()
822 result = curl_mime_subparts(finalform, form); in Curl_getformdata()
827 curl_mime *multipart = form; in Curl_getformdata()
829 part = curl_mime_addpart(form); in Curl_getformdata()
931 int curl_formget(struct curl_httppost *form, void *arg, in curl_formget() argument
934 (void) form; in curl_formget()
940 void curl_formfree(struct curl_httppost *form) in curl_formfree() argument
942 (void)form; in curl_formfree()