T o d a y I t e s t e d a C G I p r o g r a m a d d e d a p r o x y f u n c t i o n . W h e n g e t t i n g a U R L w i t h " t a r g e t " s t r i n g , t h e p r o x y f u n c t i o n w a s a c t i v e d , t h e p r o g r a m
g e t t h e h o s t n a m e f o l l o w i n g t h e " t a r g e t " a n d c o m p a r e i t w i t h t h e l o c a l h o s t n a m e . I f t h e y a r e s a m e , i t d i d s u c h s a m e t h i n g s a s t h e b e f o r e ;
o t h e r w i s e , t h e U R L r e q u e s t w i l l b e t r a n s f e r r e d t o a n o t h e r h o s t b y t h e h o s t n a m e .
Y e s t e r d a y I m o d i f i e d t h e c o d e s . T h i s m o r n i n g t h e t e s t r e p o r t a l s o w a s f i n i s h e d . S o , I w a i t t o t e s t i t .
g e t t h e h o s t n a m e f o l l o w i n g t h e " t a r g e t " a n d c o m p a r e i t w i t h t h e l o c a l h o s t n a m e . I f t h e y a r e s a m e , i t d i d s u c h s a m e t h i n g s a s t h e b e f o r e ;
o t h e r w i s e , t h e U R L r e q u e s t w i l l b e t r a n s f e r r e d t o a n o t h e r h o s t b y t h e h o s t n a m e .
Y e s t e r d a y I m o d i f i e d t h e c o d e s . T h i s m o r n i n g t h e t e s t r e p o r t a l s o w a s f i n i s h e d . S o , I w a i t t o t e s t i t .
本文介绍了作者测试含有代理功能的CGI程序的过程。当请求URL包含target字符串时,程序将激活代理功能,并根据目标主机名与本地主机名是否相同来决定是否转发请求。

被折叠的 条评论
为什么被折叠?



