Why CUPS ships a web server instead of using httpd?

有些话、适合烂在心里 提交于 2021-02-19 05:24:38

问题


CUPS implements its own web server to host CGI programs on http://localhost:631

server: https://github.com/apple/cups/blob/master/cups/http.c

CGI pages: https://github.com/apple/cups/tree/master/cgi-bin

Creating a web server just for a printing daemon seems like duplicate code and bloat that might lead to code harder to maintain and possible creation of bugs.

Why an actual httpd daemon like Apache is not used?


回答1:


CUPS uses the Internet Printing Protocol (IPP) for transferring jobs from print clients to print servers (and potentially to printers, if these support IPP).

IPP is based on HTTP.
But IPP is not the same as HTTP.

Also, the CUPS web server is not the same as the CUPS printing daemon. You can disable the web interface completely by putting WebInterface No into your cupsd.conf.

Using Apache or any other HTTP daemon would not so much unbloat CUPS: because these daemons do not talk IPP, and they do not provide any functions as a print server. Therefore, adding them to CUPS just for the web interface would rather bloat up CUPS!



来源:https://stackoverflow.com/questions/41081105/why-cups-ships-a-web-server-instead-of-using-httpd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!