Skip to content

Commit e4b44dd

Browse files
author
Chris Love
committed
Add copyright info to example service.cpp
1 parent 4921f69 commit e4b44dd

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

examples/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Creating Certificates
2525
Self-signed certificates can be created using OpenSSL using the
2626
following steps:
2727

28-
> openssl genrsa -des3 -passout pass:x -out serer.pass.key 2048
29-
> openssl rsa -passin pass:x -in server.pass.key -out server.key
30-
> openssl req -new -key server.key -out server.csr
31-
> openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
28+
$ openssl genrsa -des3 -passout pass:x -out serer.pass.key 2048
29+
$ openssl rsa -passin pass:x -in server.pass.key -out server.key
30+
$ openssl req -new -key server.key -out server.csr
31+
$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
3232

3333
On the last step when prompted for a challenge password it can be left
3434
empty.

examples/service.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/*
2+
This file is part of libhttpserver
3+
Copyright (C) 2014 Chris Love
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18+
USA
19+
*/
20+
121
#include <httpserver.hpp>
222
#include <iostream>
323
#include <unistd.h>
@@ -106,7 +126,7 @@ service_resource::render_DELETE(const http_request &req, http_response** res)
106126

107127
int main(int argc, char **argv)
108128
{
109-
uint16_t port=8090;
129+
uint16_t port=8080;
110130
int c;
111131
const char *key="key.pem";
112132
const char *cert="cert.pem";

0 commit comments

Comments
 (0)