flag_h and magic number

Implement flag_h for usage in main.c  .
Use marcos instead of magic number in http.c .