Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit faa7492

Browse files
committedApr 11, 2023
testing parsing
1 parent 44088a2 commit faa7492

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed
 

‎parcing/config.conf

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ server
99
error_page 404 htmlErrorPages/error404.html;
1010
max_client_body_size 100;
1111
location / {
12-
allow_methods GET;
12+
allow_methods GET POST;
1313
index index.html index.php;
1414
autoindex 1;
1515
root /Users/azabir/Desktop/42Cursus/webserve;
16+
cgi_pass php /Users/azabir/Desktop/42Cursus/webserve/php-cgi;
17+
1618
}
1719

1820
location /put_test {

‎test.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php
2-
echo "Welcome {$_POST["name"]} <br>";
3-
echo "Your email address is: {$_POST["email"]} <br>";
2+
echo "Welcome {$_POST["name"]}, ";
3+
echo "Your email address is: {$_POST["email"]}";
44
?>

‎tests

-1
This file was deleted.

‎tests.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
curl http://127.0.0.1:8000 \
2+
| curl http://127.0.0.1:8000/test.php -X "POST" -d "name=Abdo &email=Abdo@email.com"

0 commit comments

Comments
 (0)
Please sign in to comment.