3 URL::URL(char *input_buf
) {
4 char *buffer
= new char[BUFSIZ
];
6 ACE_OS::strcpy(buffer
,input_buf
);
13 if((temp
= ACE_OS::strtok_r(buffer
,": ",&lasts
))) {
14 protocol_
= (char *) ACE_OS::malloc(ACE_OS::strlen(temp
) + 1);
15 ACE_OS::strcpy(protocol_
, temp
);
18 if((temp
= ACE_OS::strtok_r(0,"/",&lasts
))) {
19 hostname_
= (char *) ACE_OS::malloc(ACE_OS::strlen(temp
) + 1);
20 ACE_OS::strcpy(hostname_
, temp
);
22 if((temp
= ACE_OS::strtok_r(0,"\0",&lasts
))) {
23 filename_
= (char *) ACE_OS::malloc(ACE_OS::strlen(temp
) + 1);
24 ACE_OS::strcpy(filename_
, temp
);
27 filename_
= (char *) ACE_OS::malloc(ACE_OS::strlen(INDEX_NAME
) + 1);
28 ACE_OS::strcpy(filename_
,INDEX_NAME
);
32 char *URL::get_protocol() {
36 char *URL::get_hostname() {
40 char *URL::get_filename() {
48 ACE_OS::unlink(TEMPORARY_FILE_NAME
);
49 ACE_OS::unlink(INCOMING_FILE_NAME
);