Firenet

Diff
Login

Diff

Differences From Artifact [d56699a8b2]:

To Artifact [92f2b1397a]:


81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
81
82
83
84
85
86
87

88
89
90
91
92
93
94







-







          const char *version,
          const char *upload_data, size_t *upload_data_size, void **ptr);
static HTTP_TYPE get_method( const char *method );
static char *classify_url(const char *url,
							RSERV_DATA *data,
							char *lurl_buffer,
							URL_TYPE *type);
//static URL_TYPE url_type( char *url,RSERV_DATA *rdata );
static void set_address( struct MHD_Connection *connection, RSERV_DATA *data);
static int check_address(  RSERV_DATA *data);

static int http (void *cls,
          struct MHD_Connection *connection,
          const char *url,
          HTTP_TYPE method,
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
417
418
419
420
421
422
423











































424
425
426
427
428
429
430







-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-







		}
	}
	
	return lurl;
}


//***********************************************************************
/*
*	URL_TYPE url_type( char *url,RSERV_DATA *rdata ) - Classify URL
*
*	INPUT:	received URL
*
*	OUTPUT:	Return if URL is going to REST, HTTP or nothing
*			Compare URL up to first / and see if it matches
*			the HTTP or REST path or neither
*/
//**********************************************************************/

/*
static URL_TYPE url_type( char *url,RSERV_DATA *rdata )
{	
	int i;
	URL_TYPE type = NO_SITE;
	char base[256];
	
	// (1) Copy first 256 bytes of the URL and use that for further work
	// also upper case it
	
	strncpy(base,url,256);
	for(i=0; i<256; i++ )
		base[i] = toupper(base[i]);
		
	// (2) Now compare it with the http_base & rest base
	
	if( strncmp(base,rdata->http_base,strlen(rdata->http_base)) == 0 )
	{
		type = HTTP_SITE;
	}
	else
	{
		if( strncmp(base,rdata->rest_base,strlen(rdata->rest_base)) == 0 )
		{
			type = REST_SITE;
		}
	}
	
	return type;
}
*/

#if 0
	#pragma mark -
	#pragma mark -- HTTP support ---
#endif

/***********************************************************************