Advanced Web Server/HTTP Server
190 likes | 249 Views
Learn the key differences between the two servers, their utilities, features, compatibility, and setup processes, enabling you to make an informed choice for your web server needs.
Advanced Web Server/HTTP Server
E N D
Presentation Transcript
Advanced Web Server/HTTP Server AWS/HTTP Server – how do they differ? The Net+Works Windows Utility AWS/Pbuilder HTTP server
Advanced Web Server/HTTP Server Differences • HTTP Server • Uses HTML-to-C utility • Provides solid basic server • AWS Server • Uses Pbuilder utility • Provides advanced features • HTTP v1.1 compatibility • File upload • File system stubs • External CGI • Cookies • Web content compression
Net+Works Windows Utility • Access either HTTP Server (HTML->C) or AWS (Pbuilder) utility • Use the App Wizard to construct your Server application • Use FTP-> to load your Server application to the board
AWS/pbuilder • Not needed unless interaction • Pbuilder will compile html • All tags must have an <!– RpEnd • Space required after !— • Space required before • RpEnd follows the html command • Rppages.c and PbSetUp.txt lines need <cr><lf> • Basic format • <!– RpCommand • Some html • <!– RpEnd
Running pbuilder Add new pbuilder commands Image files (.jpeg, .bmp) html files New html files File.pbb pbuilder Pbsetup.txt
Running pbuilder pbuilder Rpsetup.txt rppages.c c files _v.c files Place modules Into separate file Project
HTTP Project Structure All Additional Application C Files Additional Library File
Creating your utility programs • Aka filling in the stub programs • Copy stubs to new file • Fill in the stubs • When done, use DontCreateVariablesFile • Use std c commands • For “get” commands, replace the default variable with your own char * • Start small/simple
Review an existing application • html code • pbuilder calls • Application modules (filled out routines) • rppages.c
Hints and Kinks • Do • Always generate the html first • Always use a batch file • Create subroutines in separate files • Use PbSetUp.txt file • RpSetUp.txt/rppages.c lines must end with <cr><lf>
Hints and Kinks • Don’t • Fill out subroutines in _v.c files • Develop without a batch file
Fill-in Dynamic Function Calls in the C Source Code Link in httpd.a HTML to C Utility Web Page(s) • Web Page _*.c files • URL.C • bindata.c Integrating an HTTP Server Baseline Application Kernel, Stack, BSP
Net+Os v6.0 Enhancements File System
HTTP Server (File System) • This’s actually RomPager file system interface • RomPager handles POP3, SMTP & HTTP server. • Define APP_FILE_SYSTEM in file.c or application build file • Upload file to the file system from web pages • Download files from the file system • Use “FS” prefix to access any files in the file system.
HTTP Server (File System) Upload • Only MULTIPART/FORM-DATA of ENCTYPE is supported for file upload • Use web page access value • Multiple access values / no web page access • Use the same group id of a directory where a file or directory is created to • Use default value (from RpHSSetDefaultGroupId) for creating a file/directory in ROOT directory
HTTP Server (File System) Download • User is prompted for username/password when downloading a file • Username/password is not required when a file can be accessed from the default permission (from RpHSSetDefaultGroupId)
HTTP Server (File System) • RpHSSetCurrentDirectory • Setup the directory for the current connection • RpHSGetErrorStatus • Get the status for the current connection • RpHSSetDefaultGroupId • Setup default group id. • This group id is used for retrieving a file. If a file can be retrieved for the default group id access, no username or password is required. • RpHSGetDefaultGroupId • Return default group id