ssi.h File Reference

SSI (Server Side Includes) More...

#include "http/http_server.h"

Go to the source code of this file.

Functions

error_t ssiExecuteScript (HttpConnection *connection, const char_t *uri, uint_t level)
 Execute SSI script. More...
 
error_t ssiProcessCommand (HttpConnection *connection, const char_t *tag, size_t length, const char_t *uri, uint_t level)
 Process SSI directive. More...
 
error_t ssiProcessIncludeCommand (HttpConnection *connection, const char_t *tag, size_t length, const char_t *uri, uint_t level)
 Process SSI include directive. More...
 
error_t ssiProcessEchoCommand (HttpConnection *connection, const char_t *tag, size_t length)
 Process SSI echo directive. More...
 
error_t ssiProcessExecCommand (HttpConnection *connection, const char_t *tag, size_t length)
 Process SSI exec directive. More...
 
error_t ssiSearchTag (const char_t *s, size_t sLen, const char_t *tag, size_t tagLen, uint_t *pos)
 Search a string for a given tag. More...
 

Detailed Description

SSI (Server Side Includes)

License

Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file ssi.h.

Function Documentation

◆ ssiExecuteScript()

error_t ssiExecuteScript ( HttpConnection connection,
const char_t uri,
uint_t  level 
)

Execute SSI script.

Parameters
[in]connectionStructure representing an HTTP connection
[in]uriNULL-terminated string containing the file to process
[in]levelCurrent level of recursion
Returns
Error code

Definition at line 65 of file ssi.c.

◆ ssiProcessCommand()

error_t ssiProcessCommand ( HttpConnection connection,
const char_t tag,
size_t  length,
const char_t uri,
uint_t  level 
)

Process SSI directive.

Parameters
[in]connectionStructure representing an HTTP connection
[in]tagPointer to the SSI tag
[in]lengthTotal length of the SSI tag
[in]uriNULL-terminated string containing the file being processed
[in]levelCurrent level of recursion
Returns
Error code

Definition at line 362 of file ssi.c.

◆ ssiProcessEchoCommand()

error_t ssiProcessEchoCommand ( HttpConnection connection,
const char_t tag,
size_t  length 
)

Process SSI echo directive.

This echo directive displays the contents of a specified HTTP environment variable

Parameters
[in]connectionStructure representing an HTTP connection
[in]tagPointer to the SSI tag
[in]lengthTotal length of the SSI tag
Returns
Error code

Definition at line 596 of file ssi.c.

◆ ssiProcessExecCommand()

error_t ssiProcessExecCommand ( HttpConnection connection,
const char_t tag,
size_t  length 
)

Process SSI exec directive.

This exec directive executes a program, script, or shell command on the server. The cmd parameter specifies a server-side command. The cgi parameter specifies the path to a CGI script

Parameters
[in]connectionStructure representing an HTTP connection
[in]tagPointer to the SSI tag
[in]lengthTotal length of the SSI tag
Returns
Error code

Definition at line 755 of file ssi.c.

◆ ssiProcessIncludeCommand()

error_t ssiProcessIncludeCommand ( HttpConnection connection,
const char_t tag,
size_t  length,
const char_t uri,
uint_t  level 
)

Process SSI include directive.

This include directive allows the content of one document to be included in another. The file parameter defines the included file as relative to the document path. The virtual parameter defines the included file as relative to the document root

Parameters
[in]connectionStructure representing an HTTP connection
[in]tagPointer to the SSI tag
[in]lengthTotal length of the SSI tag
[in]uriNULL-terminated string containing the file being processed
[in]levelCurrent level of recursion
Returns
Error code

Definition at line 420 of file ssi.c.

◆ ssiSearchTag()

error_t ssiSearchTag ( const char_t s,
size_t  sLen,
const char_t tag,
size_t  tagLen,
uint_t pos 
)

Search a string for a given tag.

Parameters
[in]sString to search
[in]sLenLength of the string to search
[in]tagString containing the tag to search for
[in]tagLenLength of the tag
[out]posThe index of the first occurrence of the tag in the string,
Return values
NO_ERRORif the specified tag has been found
ERROR_PARTIAL_MATCHif a partial match occurs
ERROR_NO_MATCHif the tag does not appear in the string

Definition at line 829 of file ssi.c.