Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tinyhttpd branch #56

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This is a basic workflow that is manually triggered

name: Builder

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
name:
# Friendly description to be shown in the UI instead of 'name'
description: 'Person to greet'
# Default value if no value is explicitly provided
default: 'World'
# Input has to be provided for the workflow to run
required: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
greet:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Send greeting
run: echo "Hello ${{ github.event.inputs.name }}"

- name: get the version
id: get_version
run: |
GIT_VERSION=$(git describe --tags)
echo ::set-output name=BUILD_TAG::httpd-$GIT_VERSION

- name: create release
uses: ncipollo/[email protected]
with:
tag: ${{ steps.get_version.outputs.BUILD_TAG }}
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
all: httpd client
LIBS = -lpthread #-lsocket
all: httpd

httpd: httpd.c
gcc -g -W -Wall $(LIBS) -o $@ $<
gcc -W -Wall -lpthread -o httpd httpd.c -g

client: simpleclient.c
gcc -W -Wall -o $@ $<
clean:
rm httpd
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
A mirror for tinyhttpd(Tinyhttpd非官方镜像,Fork自[sourceForge](https://sourceforge.net/projects/tiny-httpd/),仅供学习)

测试CGI时需要本机安装PERL,同时安装perl-cgi
测试CGI时需要本机安装PERL,同时安装perl-cgi: yum install per-CGI
首先需要对htdoc文件夹下的color.cgi和index.html进行权限查看,并把color.cgi改为777,index.html改为666
执行which perl的命令,查看perl的路径,记录下来并vim修改color.cgi的第一行代码为所在路径

### Prepare
Compile for Linux
Expand Down
2 changes: 1 addition & 1 deletion htdocs/color.cgi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/local/bin/perl -Tw
#!/usr/bin/perl -Tw

use strict;
use CGI;
Expand Down
Loading