Changeset d8c68f7f9c768f881d6e7d1b9372cf709d1a6e52
- Timestamp:
- 05/07/08 18:10:25 (2 months ago)
- git-parent:
- Files:
-
- modules/stream_out/rtsp.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/stream_out/rtsp.c
rfe18263 rd8c68f7 349 349 char control[sizeof("rtsp://[]:12345") + NI_MAXNUMERICHOST 350 350 + strlen( rtsp->psz_path )]; 351 time_t now; 352 353 time (&now); 351 354 352 355 if( answer == NULL || query == NULL || cl == NULL ) … … 376 379 answer->i_body = 0; 377 380 answer->p_body = NULL; 381 382 httpd_MsgAdd( answer, "Server", "%s", PACKAGE_STRING ); 383 384 /* Date: is always allowed, and sometimes mandatory with RTSP/2.0. */ 385 struct tm ut; 386 if (gmtime_r (&now, &ut) != NULL) 387 { /* RFC1123 format, GMT is mandatory */ 388 static const char wdays[7][4] = { 389 "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; 390 static const char mons[12][4] = { 391 "Jan", "Feb", "Mar", "Apr", "May", "Jun", 392 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; 393 httpd_MsgAdd (answer, "Date", "%s, %02u %s %04u %02u:%02u:%02u GMT", 394 wdays[ut.tm_wday], ut.tm_mday, mons[ut.tm_mon], 395 1900 + ut.tm_year, ut.tm_hour, ut.tm_min, ut.tm_sec); 396 } 378 397 379 398 if( query->i_proto != HTTPD_PROTO_RTSP ) … … 690 709 } 691 710 692 httpd_MsgAdd( answer, "Server", "%s", PACKAGE_STRING );693 711 if( psz_session ) 694 712 httpd_MsgAdd( answer, "Session", "%s"/*;timeout=5*/, psz_session );
